[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JW5CJXMTHHDX7H09NQ737W":3,"skill-same:01M6JW5CJXMTHHDX7H09NQ737W":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6JW5CJXMTHHDX7H09NQ737W","constraint",null,"Use this skill whenever the design must structurally prevent invalid actions — input validation, disabled states, required fields, type-restricted inputs, mode locks, role-based gates, hardware lockouts. Trigger when designing forms, picking input types, designing destructive flows, gating multi-step procedures, or thinking about how to prevent a class of errors from being possible at all. Constraint is one of the foundational principles in 'Universal Principles of Design' (Lidwell, Holden, Butler 2003) and one of the strongest design moves available — preventing wrong actions is more powerful than detecting them after the fact.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FHDeibler\u002Funiversal-design-principles\u002Fplugins\u002Finteraction-and-control-principles\u002Fskills\u002Fconstraint\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"types","when","gating","at","mode","more","errors","detecting","flows","states","design","Input Validation","how to","input","trigger","butler","invalid","forms","thinking","how","actions","2026-11-10 10:12:30",false,"---\nname: constraint\ndescription: 'Use this skill whenever the design must structurally prevent invalid actions — input validation, disabled states, required fields, type-restricted inputs, mode locks, role-based gates, hardware lockouts. Trigger when designing forms, picking input types, designing destructive flows, gating multi-step procedures, or thinking about how to prevent a class of errors from being possible at all. Constraint is one of the foundational principles in ''Universal Principles of Design'' (Lidwell, Holden, Butler 2003) and one of the strongest design moves available — preventing wrong actions is more powerful than detecting them after the fact.'\n---\n\n# Constraint\n\nA constraint is anything that limits the actions a user can perform on a system. Some constraints are physical (you can't insert a USB-C connector upside-down because the shape rejects it). Some are psychological (you don't try to push a door labeled \"PULL\" because the convention overrides the impulse). Both kinds work upstream of error: instead of catching wrong actions after they happen, constraints make wrong actions hard or impossible.\n\n## Definition (in our own words)\n\nA constraint is a deliberate limitation on what the user can do. The limitation may be implemented in the physical structure of the design (a slot that only accepts one shape), in the system's software (a button disabled until preconditions are met), or in the user's psychology (a convention that makes the wrong action feel obviously wrong). All three reduce error rates dramatically — constraints are usually cheaper than recovery, because they prevent the recovery from being needed.\n\n## Origins and research lineage\n\n- **Donald Norman**, *The Design of Everyday Things* (1988). Introduced constraints as one of the central tools for usable design. Norman distinguished four types: *physical, semantic, cultural, logical*. Lidwell, Holden, and Butler simplify to two (physical and psychological), with psychological encompassing semantic, cultural, and logical.\n- **Lidwell, Holden & Butler** (2003) compactly distinguish:\n  - **Physical constraints**: paths (channels that direct motion), axes (rotary controls), barriers (block undesired actions).\n  - **Psychological constraints**: symbols (semantic communication), conventions (learned practices), mappings (perceived control-effect relationships).\n- **James Reason**, *Human Error* (1990). Argued for constraints as the strongest defense against slip-type errors — making the wrong action structurally impossible is more reliable than training operators to avoid it.\n- **Affordance theory** (J. J. Gibson, 1979) is the conceptual companion: affordance suggests what *can* be done; constraint blocks what *can't*. Together they describe the action space.\n\n## Why constraints matter\n\nEvery error you prevent at the design layer is an error you don't have to detect, recover from, explain, or apologize for. Constraints are the design layer's strongest move because they operate before error occurs:\n\n- **Confirmation** asks the user to verify after they've taken the wrong-feeling action.\n- **Undo** lets them recover after they've taken the wrong action.\n- **Constraint** makes the wrong action impossible in the first place.\n\nThe discipline: when you're tempted to add a confirmation, ask first whether a constraint would do the same job better. Often yes.\n\n## Physical constraints\n\nIn hardware, physical constraints are the shape of an object directing how it can be used.\n\nThe book identifies three subtypes:\n\n### Paths\n\nChannels that direct motion. Examples:\n\n- A scrollbar that constrains motion to one axis.\n- A slot that only accepts a specific connector shape.\n- A door with hinges on one side; it only swings one direction.\n\nIn software UI: a slider input is a path constraint — the user can only move along one dimension.\n\n### Axes\n\nRotary controls. Convert applied force into rotation. Examples:\n\n- A doorknob.\n- A trackball.\n- A volume knob.\n\nIn software UI: rotation gestures, dial inputs, the \"spin\" of an iOS time picker.\n\n### Barriers\n\nBlock, slow, or redirect motion. Examples:\n\n- A railroad crossing barrier.\n- The boundary of a screen (the cursor stops there — Fitts's edge advantage).\n- A child-safety cap on a medicine bottle.\n\nIn software UI: a modal dialog blocks interaction with the page beneath; a permission gate blocks access to a feature.\n\n## Psychological constraints\n\nConstraints that don't physically prevent action but lean on perception, convention, or knowledge.\n\nThe book identifies three subtypes:\n\n### Symbols\n\nCommunicate meaning through language and iconography. Examples:\n\n- A skull-and-crossbones on a poison bottle.\n- The \"WET FLOOR\" sign.\n- A red traffic light.\n\nIn software UI: a \"Disabled\" badge; a \"Restricted\" tooltip; a warning icon.\n\n### Conventions\n\nLearned practices. Examples:\n\n- \"Red means stop, green means go.\"\n- \"Click the X to close.\"\n- \"Cmd-S saves.\"\n\nConventions are a constraint because the user *expects* certain actions to do certain things; design that conforms is constrained-by-convention to behave as expected.\n\n### Mappings\n\nPerceived relationships between controls and effects. Examples:\n\n- Light switches near the lights they control.\n- A volume dial that turns the same way the user expects up\u002Fdown to work.\n- A stovetop where each burner has a knob in a corresponding position.\n\nGood mappings constrain user error by making the wrong action *feel* wrong.\n\n## When to apply\n\n- **Always**, on input fields. Type, length, range, format.\n- **Always**, on actions with preconditions. Submit disabled until form valid; \"Send invoice\" disabled until recipient selected.\n- **On destructive actions where the constraint can be a forcing function**. Required type-to-confirm; required password re-entry.\n- **On role-gated functionality**. Admin-only actions hidden or disabled for non-admins.\n- **On state-dependent actions**. \"Edit\" only enabled in edit mode; \"Save\" only enabled when changes exist.\n\n## When NOT to over-constrain\n\nConstraints that don't reflect real requirements feel arbitrary and frustrating:\n\n- **Forced format that's stricter than necessary** — a phone field that rejects parentheses.\n- **Validation that reflects implementation, not user need** — \"Display name must contain only ASCII.\" Why?\n- **Mode locks the user can't predict** — a \"read mode\" they didn't enter and can't escape.\n- **Disabled buttons with no explanation** — the user can't act and doesn't know why.\n\nThe discipline: constrain *real* requirements; communicate the constraint clearly when it surprises.\n\n## Worked examples\n\n### Example 1: input type as constraint\n\n```html\n\u003Cinput type=\"email\" required maxlength=\"254\" autocomplete=\"email\" \u002F>\n\u003Cinput type=\"tel\" inputmode=\"numeric\" pattern=\"[0-9-]+\" \u002F>\n\u003Cinput type=\"number\" min=\"0\" max=\"999\" step=\"1\" \u002F>\n```\n\nThe browser enforces the constraints. `type=\"email\"` rejects malformed emails; `min=\"0\"` rejects negative numbers. The user can't submit invalid input.\n\n### Example 2: button disabled until valid\n\n```html\n\u003Cform id=\"signup\">\n  \u003Cinput name=\"email\" type=\"email\" required \u002F>\n  \u003Cinput name=\"password\" type=\"password\" required minlength=\"12\" \u002F>\n  \u003Cbutton id=\"submit\" disabled>Create account\u003C\u002Fbutton>\n\u003C\u002Fform>\n\n\u003Cscript>\nconst form = document.getElementById('signup');\nconst btn = document.getElementById('submit');\nform.addEventListener('input', () => {\n  btn.disabled = !form.checkValidity();\n});\n\u003C\u002Fscript>\n```\n\nSubmit can't trigger until the form is valid. Pair with inline validation messages so the user knows what's missing.\n\n### Example 3: role-based gating\n\n```jsx\nfunction DeleteButton({ project, currentUser }) {\n  const canDelete = currentUser.role === 'admin' || project.ownerId === currentUser.id;\n  if (!canDelete) {\n    return null; \u002F\u002F hide entirely; user can't even attempt\n  }\n  return \u003Cbutton onClick={confirmDelete}>Delete project\u003C\u002Fbutton>;\n}\n```\n\nUsers without permission don't see the button. The wrong action can't happen.\n\n### Example 4: type-to-confirm as a forcing-function constraint\n\nThe destructive button is disabled until the user types the resource name. The constraint converts a single click into a deliberate multi-step action.\n\n```html\n\u003Cdialog>\n  \u003Ch2>Delete workspace \"Acme Inc\"?\u003C\u002Fh2>\n  \u003Cp>This cannot be undone. Type \u003Cstrong>Acme Inc\u003C\u002Fstrong> to confirm:\u003C\u002Fp>\n  \u003Cinput id=\"confirm\" \u002F>\n  \u003Cbutton id=\"delete-btn\" disabled class=\"destructive\">Delete workspace\u003C\u002Fbutton>\n\u003C\u002Fdialog>\n\n\u003Cscript>\ndocument.getElementById('confirm').addEventListener('input', e => {\n  document.getElementById('delete-btn').disabled = e.target.value !== 'Acme Inc';\n});\n\u003C\u002Fscript>\n```\n\n### Example 5: hardware-style physical constraint in UI\n\nA drag-and-drop with a strict drop-zone restriction:\n\n```js\nfunction isValidDropTarget(item, target) {\n  if (item.type === 'file' && target.acceptsFiles) return true;\n  if (item.type === 'folder' && target.acceptsFolders) return true;\n  return false;\n}\n\ndropZone.addEventListener('dragover', e => {\n  if (isValidDropTarget(draggedItem, dropZone)) {\n    dropZone.classList.add('drop-valid');\n    e.preventDefault(); \u002F\u002F allow drop\n  } else {\n    dropZone.classList.add('drop-invalid');\n    \u002F\u002F do not preventDefault — drop won't fire\n  }\n});\n```\n\nThe browser's drag-and-drop API itself is a constraint mechanism: not preventing default during dragover prevents the drop. The user *can't* complete the wrong drop.\n\n### Example 6: USB-C as the canonical physical constraint\n\nUSB-C connectors have rotational symmetry — they fit either way. USB-A connectors do not. Generations of users have struggled with the USB-A \"flip the cable to insert it correctly\" failure. USB-C eliminated the failure mode at the design layer; no error to recover from.\n\nThe lesson for software: when you can change the design so the failure can't happen, do that.\n\n## Cross-domain examples\n\n### Aviation: the auto-pilot disengagement\n\nThe auto-pilot can be disengaged by pulling back firmly on the yoke. The disengagement is *constrained* — a casual touch doesn't trigger it, a firm pull does. The constraint matches the seriousness of the action.\n\n### Medicine: child-safety pill caps\n\nA child-safety cap requires push-and-twist simultaneously. The constraint reduces accidental childhood poisoning dramatically. The cost: arthritic adults sometimes struggle with the cap. Trade-off acknowledged; the design is calibrated to the population at greatest risk.\n\n### Industrial: dead-man switches\n\nEquipment that requires continuous operator engagement (a hand on the trigger, a foot on the pedal) shuts off if the operator becomes incapacitated. The constraint protects against operator failure.\n\n### Software: capability-based security\n\nModern security designs constrain code to only the capabilities it explicitly needs. A web page can't read your filesystem; an app can't access your microphone without explicit permission; a sandbox limits what an embedded program can do. Each is a constraint at the system layer.\n\n## Anti-patterns\n\n- **Disabled buttons with no explanation.** User doesn't know why they can't act.\n- **Constraints that don't match user need** — overly strict format requirements that reject reasonable input.\n- **Hidden constraints** — the user discovers the limit only after attempting (e.g., a character limit not mentioned until they exceed it).\n- **Constraints framed as failures** — \"Invalid input\" instead of \"Please enter a valid email like name@example.com.\"\n- **Modal traps** — a modal that constrains too aggressively (no Esc, no close X) trapping the user.\n\n## Heuristics\n\n1. **The \"what could the constraint replace?\" check.** For each confirmation in your app, ask: could a constraint do this job? Often yes.\n2. **The disabled-button audit.** Every disabled control should have a visible explanation of why it's disabled and what would enable it.\n3. **The wrong-action thought experiment.** For each destructive flow, imagine a user attempting to take the wrong action. What constraint would prevent it?\n4. **The convention check.** Are you violating a learned convention? If yes, the convention is a constraint working against you; either honor it or surface the violation explicitly.\n\n## Related principles\n\n- **`affordance`** — affordance suggests what *can* be done; constraint limits what *can't*. Companion principles.\n- **`mapping`** — good mapping is a psychological constraint that makes wrong actions feel wrong.\n- **`forgiveness`** — when constraint isn't possible, forgiveness handles the recovery.\n- **`errors`** — constraints prevent the slip and mistake categories of error.\n- **`expectation-effect`** — constraints work better when they match user expectation.\n- **`visibility`** — constraints must be visible to be navigable.\n\n## Sub-aspect skills\n\n- **`constraint-physical`** — paths, axes, barriers; structural constraints in physical or screen-equivalent form.\n- **`constraint-psychological`** — symbols, conventions, mappings; the constraint of expectation and learned practice.\n\n## Closing\n\nConstraint is one of the most powerful design tools and one of the most under-used. The reflexive design move on encountering an error is to add a confirmation or improve recovery; the better move, when possible, is to make the wrong action structurally impossible. Constraints are unglamorous but pay continuously across every user, every day.\n","# Constraint\n\nA constraint is anything that limits the actions a user can perform on a system. Some constraints are physical (you can't insert a USB-C connector upside-down because the shape rejects it). Some are psychological (you don't try to push a door labeled \"PULL\" because the convention overrides the impulse). Both kinds work upstream of error: instead of catching wrong actions after they happen, constraints make wrong actions hard or impossible.\n\n## Definition (in our own words)\n\nA constraint is a deliberate limitation on what the user can do. The limitation may be implemented in the physical structure of the design (a slot that only accepts one shape), in the system's software (a button disabled until preconditions are met), or in the user's psychology (a convention that makes the wrong action feel obviously wrong). All three reduce error rates dramatically — constraints are usually cheaper than recovery, because they prevent the recovery from being needed.\n\n## Origins and research lineage\n\n- **Donald Norman**, *The Design of Everyday Things* (1988). Introduced constraints as one of the central tools for usable design. Norman distinguished four types: *physical, semantic, cultural, logical*. Lidwell, Holden, and Butler simplify to two (physical and psychological), with psychological encompassing semantic, cultural, and logical.\n- **Lidwell, Holden & Butler** (2003) compactly distinguish:\n  - **Physical constraints**: paths (channels that direct motion), axes (rotary controls), barriers (block undesired actions).\n  - **Psychological constraints**: symbols (semantic communication), conventions (learned practices), mappings (perceived control-effect relationships).\n- **James Reason**, *Human Error* (1990). Argued for constraints as the strongest defense against slip-type errors — making the wrong action structurally impossible is more reliable than training operators to avoid it.\n- **Affordance theory** (J. J. Gibson, 1979) is the conceptual companion: affordance suggests what *can* be done; constraint blocks what *can't*. Together they describe the action space.\n\n## Why constraints matter\n\nEvery error you prevent at the design layer is an error you don't have to detect, recover from, explain, or apologize for. Constraints are the design layer's strongest move because they operate before error occurs:\n\n- **Confirmation** asks the user to verify after they've taken the wrong-feeling action.\n- **Undo** lets them recover after they've taken the wrong action.\n- **Constraint** makes the wrong action impossible in the first place.\n\nThe discipline: when you're tempted to add a confirmation, ask first whether a constraint would do the same job better. Often yes.\n\n## Physical constraints\n\nIn hardware, physical constraints are the shape of an object directing how it can be used.\n\nThe book identifies three subtypes:\n\n### Paths\n\nChannels that direct motion. Examples:\n\n- A scrollbar that constrains motion to one axis.\n- A slot that only accepts a specific connector shape.\n- A door with hinges on one side; it only swings one direction.\n\nIn software UI: a slider input is a path constraint — the user can only move along one dimension.\n\n### Axes\n\nRotary controls. Convert applied force into rotation. Examples:\n\n- A doorknob.\n- A trackball.\n- A volume knob.\n\nIn software UI: rotation gestures, dial inputs, the \"spin\" of an iOS time picker.\n\n### Barriers\n\nBlock, slow, or redirect motion. Examples:\n\n- A railroad crossing barrier.\n- The boundary of a screen (the cursor stops there — Fitts's edge advantage).\n- A child-safety cap on a medicine bottle.\n\nIn software UI: a modal dialog blocks interaction with the page beneath; a permission gate blocks access to a feature.\n\n## Psychological constraints\n\nConstraints that don't physically prevent action but lean on perception, convention, or knowledge.\n\nThe book identifies three subtypes:\n\n### Symbols\n\nCommunicate meaning through language and iconography. Examples:\n\n- A skull-and-crossbones on a poison bottle.\n- The \"WET FLOOR\" sign.\n- A red traffic light.\n\nIn software UI: a \"Disabled\" badge; a \"Restricted\" tooltip; a warning icon.\n\n### Conventions\n\nLearned practices. Examples:\n\n- \"Red means stop, green means go.\"\n- \"Click the X to close.\"\n- \"Cmd-S saves.\"\n\nConventions are a constraint because the user *expects* certain actions to do certain things; design that conforms is constrained-by-convention to behave as expected.\n\n### Mappings\n\nPerceived relationships between controls and effects. Examples:\n\n- Light switches near the lights they control.\n- A volume dial that turns the same way the user expects up\u002Fdown to work.\n- A stovetop where each burner has a knob in a corresponding position.\n\nGood mappings constrain user error by making the wrong action *feel* wrong.\n\n## When to apply\n\n- **Always**, on input fields. Type, length, range, format.\n- **Always**, on actions with preconditions. Submit disabled until form valid; \"Send invoice\" disabled until recipient selected.\n- **On destructive actions where the constraint can be a forcing function**. Required type-to-confirm; required password re-entry.\n- **On role-gated functionality**. Admin-only actions hidden or disabled for non-admins.\n- **On state-dependent actions**. \"Edit\" only enabled in edit mode; \"Save\" only enabled when changes exist.\n\n## When NOT to over-constrain\n\nConstraints that don't reflect real requirements feel arbitrary and frustrating:\n\n- **Forced format that's stricter than necessary** — a phone field that rejects parentheses.\n- **Validation that reflects implementation, not user need** — \"Display name must contain only ASCII.\" Why?\n- **Mode locks the user can't predict** — a \"read mode\" they didn't enter and can't escape.\n- **Disabled buttons with no explanation** — the user can't act and doesn't know why.\n\nThe discipline: constrain *real* requirements; communicate the constraint clearly when it surprises.\n\n## Worked examples\n\n### Example 1: input type as constraint\n\n```html\n\u003Cinput type=\"email\" required maxlength=\"254\" autocomplete=\"email\" \u002F>\n\u003Cinput type=\"tel\" inputmode=\"numeric\" pattern=\"[0-9-]+\" \u002F>\n\u003Cinput type=\"number\" min=\"0\" max=\"999\" step=\"1\" \u002F>\n```\n\nThe browser enforces the constraints. `type=\"email\"` rejects malformed emails; `min=\"0\"` rejects negative numbers. The user can't submit invalid input.\n\n### Example 2: button disabled until valid\n\n```html\n\u003Cform id=\"signup\">\n  \u003Cinput name=\"email\" type=\"email\" required \u002F>\n  \u003Cinput name=\"password\" type=\"password\" required minlength=\"12\" \u002F>\n  \u003Cbutton id=\"submit\" disabled>Create account\u003C\u002Fbutton>\n\u003C\u002Fform>\n\n\u003Cscript>\nconst form = document.getElementById('signup');\nconst btn = document.getElementById('submit');\nform.addEventListener('input', () => {\n  btn.disabled = !form.checkValidity();\n});\n\u003C\u002Fscript>\n```\n\nSubmit can't trigger until the form is valid. Pair with inline validation messages so the user knows what's missing.\n\n### Example 3: role-based gating\n\n```jsx\nfunction DeleteButton({ project, currentUser }) {\n  const canDelete = currentUser.role === 'admin' || project.ownerId === currentUser.id;\n  if (!canDelete) {\n    return null; \u002F\u002F hide entirely; user can't even attempt\n  }\n  return \u003Cbutton onClick={confirmDelete}>Delete project\u003C\u002Fbutton>;\n}\n```\n\nUsers without permission don't see the button. The wrong action can't happen.\n\n### Example 4: type-to-confirm as a forcing-function constraint\n\nThe destructive button is disabled until the user types the resource name. The constraint converts a single click into a deliberate multi-step action.\n\n```html\n\u003Cdialog>\n  \u003Ch2>Delete workspace \"Acme Inc\"?\u003C\u002Fh2>\n  \u003Cp>This cannot be undone. Type \u003Cstrong>Acme Inc\u003C\u002Fstrong> to confirm:\u003C\u002Fp>\n  \u003Cinput id=\"confirm\" \u002F>\n  \u003Cbutton id=\"delete-btn\" disabled class=\"destructive\">Delete workspace\u003C\u002Fbutton>\n\u003C\u002Fdialog>\n\n\u003Cscript>\ndocument.getElementById('confirm').addEventListener('input', e => {\n  document.getElementById('delete-btn').disabled = e.target.value !== 'Acme Inc';\n});\n\u003C\u002Fscript>\n```\n\n### Example 5: hardware-style physical constraint in UI\n\nA drag-and-drop with a strict drop-zone restriction:\n\n```js\nfunction isValidDropTarget(item, target) {\n  if (item.type === 'file' && target.acceptsFiles) return true;\n  if (item.type === 'folder' && target.acceptsFolders) return true;\n  return false;\n}\n\ndropZone.addEventListener('dragover', e => {\n  if (isValidDropTarget(draggedItem, dropZone)) {\n    dropZone.classList.add('drop-valid');\n    e.preventDefault(); \u002F\u002F allow drop\n  } else {\n    dropZone.classList.add('drop-invalid');\n    \u002F\u002F do not preventDefault — drop won't fire\n  }\n});\n```\n\nThe browser's drag-and-drop API itself is a constraint mechanism: not preventing default during dragover prevents the drop. The user *can't* complete the wrong drop.\n\n### Example 6: USB-C as the canonical physical constraint\n\nUSB-C connectors have rotational symmetry — they fit either way. USB-A connectors do not. Generations of users have struggled with the USB-A \"flip the cable to insert it correctly\" failure. USB-C eliminated the failure mode at the design layer; no error to recover from.\n\nThe lesson for software: when you can change the design so the failure can't happen, do that.\n\n## Cross-domain examples\n\n### Aviation: the auto-pilot disengagement\n\nThe auto-pilot can be disengaged by pulling back firmly on the yoke. The disengagement is *constrained* — a casual touch doesn't trigger it, a firm pull does. The constraint matches the seriousness of the action.\n\n### Medicine: child-safety pill caps\n\nA child-safety cap requires push-and-twist simultaneously. The constraint reduces accidental childhood poisoning dramatically. The cost: arthritic adults sometimes struggle with the cap. Trade-off acknowledged; the design is calibrated to the population at greatest risk.\n\n### Industrial: dead-man switches\n\nEquipment that requires continuous operator engagement (a hand on the trigger, a foot on the pedal) shuts off if the operator becomes incapacitated. The constraint protects against operator failure.\n\n### Software: capability-based security\n\nModern security designs constrain code to only the capabilities it explicitly needs. A web page can't read your filesystem; an app can't access your microphone without explicit permission; a sandbox limits what an embedded program can do. Each is a constraint at the system layer.\n\n## Anti-patterns\n\n- **Disabled buttons with no explanation.** User doesn't know why they can't act.\n- **Constraints that don't match user need** — overly strict format requirements that reject reasonable input.\n- **Hidden constraints** — the user discovers the limit only after attempting (e.g., a character limit not mentioned until they exceed it).\n- **Constraints framed as failures** — \"Invalid input\" instead of \"Please enter a valid email like name@example.com.\"\n- **Modal traps** — a modal that constrains too aggressively (no Esc, no close X) trapping the user.\n\n## Heuristics\n\n1. **The \"what could the constraint replace?\" check.** For each confirmation in your app, ask: could a constraint do this job? Often yes.\n2. **The disabled-button audit.** Every disabled control should have a visible explanation of why it's disabled and what would enable it.\n3. **The wrong-action thought experiment.** For each destructive flow, imagine a user attempting to take the wrong action. What constraint would prevent it?\n4. **The convention check.** Are you violating a learned convention? If yes, the convention is a constraint working against you; either honor it or surface the violation explicitly.\n\n## Related principles\n\n- **`affordance`** — affordance suggests what *can* be done; constraint limits what *can't*. Companion principles.\n- **`mapping`** — good mapping is a psychological constraint that makes wrong actions feel wrong.\n- **`forgiveness`** — when constraint isn't possible, forgiveness handles the recovery.\n- **`errors`** — constraints prevent the slip and mistake categories of error.\n- **`expectation-effect`** — constraints work better when they match user expectation.\n- **`visibility`** — constraints must be visible to be navigable.\n\n## Sub-aspect skills\n\n- **`constraint-physical`** — paths, axes, barriers; structural constraints in physical or screen-equivalent form.\n- **`constraint-psychological`** — symbols, conventions, mappings; the constraint of expectation and learned practice.\n\n## Closing\n\nConstraint is one of the most powerful design tools and one of the most under-used. The reflexive design move on encountering an error is to add a confirmation or improve recovery; the better move, when possible, is to make the wrong action structurally impossible. Constraints are unglamorous but pay continuously across every user, every day.\n",{"name":5,"description":7},"main","b0f0a87593c578a7898eccaf1b363f7f87c1f99b","plugins\u002FHDeibler\u002Funiversal-design-principles\u002Fplugins\u002Finteraction-and-control-principles\u002Fskills\u002Fconstraint",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill constraint",{"tool":61,"command":62},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill constraint",{"tool":64,"command":65},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill constraint","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FHDeibler\u002Funiversal-design-principles\u002Fplugins\u002Finteraction-and-control-principles\u002Fskills\u002Fconstraint\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fnorman-and-design-history.md","REFERENCE","参考文档",3537,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FHDeibler\u002Funiversal-design-principles\u002Fplugins\u002Finteraction-and-control-principles\u002Fskills\u002Fconstraint\u002Freferences\u002Fnorman-and-design-history.md",[76,86,94,102,110,118],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":85},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":85},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":85},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":85},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":85},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":85},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]