Skip to content
uwussimoPublic

About

Directional Cognitive Discomfort — an agent skill for error feedback that teaches the correct action, plus the paper behind it

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

DCD — Directional Cognitive Discomfort

skills.sh

An agent skill for designing error feedback that teaches, and the working paper it comes from.

Mainstream UX treats comfort as the objective: reduce friction, minimize load, reward completion. That is the right goal for the happy path and the wrong one at the moment of error. A neutral message tells the user that they were wrong. It does not tell them which way to move, and it does not survive the session.

Directional cognitive discomfort is a brief, localized, directional, proportional, formally identical, goal-aligned aversive signal delivered at the moment of the erroneous action — a gradient the user can descend, not a verdict they have to read.

The one rule everything else follows from:

The fastest way for the user to make the signal stop must be to do the correct thing.

If the escape route is "dismiss the banner", it is not DCD. If the escape route is "do what the operator wants", it is a dark pattern.

Installation

npx skills add uwussimo/dcd

That installs the skill into the current project. Other options:

npx skills add uwussimo/dcd -g                    # install globally, for every project
npx skills add uwussimo/dcd --agent claude-code   # install for one agent only
npx skills use uwussimo/dcd | claude              # try it without installing

The skill works with Claude Code, Cursor, Copilot, Windsurf, Gemini, Cline, and the other agents the skills CLI supports. To install by hand instead, copy the dcd/ directory into your agent's skills directory (~/.claude/skills/ for Claude Code).

Once installed, the skill activates on its own whenever you work on error states, form validation, destructive-action confirmation, haptics, sound, onboarding friction, or "juice" — you don't need to mention it by name.

What the skill does

Ask an agent for error feedback and you normally get a red border and a string. The skill replaces that with a procedure:

  1. Inventory every point where a user can be wrong at a cost, ranked by cost × frequency.
  2. Classify each one — continuous (approaches validity by degrees), discrete (right or wrong), or destructive (irreversible).
  3. Fix the happy-path baseline first. Discomfort is only legible against contrast; a signal on a noisy baseline is more noise. This is the step everyone skips.
  4. Design the envelope — onset ≤150 ms and co-located, sustain that eases as the input approaches valid, resolution the instant it is, magnitude scaled to cost, decay after competence, and a reduced-motion equivalent that keeps the direction rather than deleting the signal.
  5. Implement on web, iOS, Android, or React Native.
  6. Audit against the six-property contract, with a dark-pattern check.
  7. Test with the two-group protocol — primary outcome is error recurrence on the second exposure, not first-session completion.

It also carries the verdict vocabulary the audit reports in: a signal passing all six properties is a gradient; failing directionality makes it a warning; failing formal predictability makes it noise; friction that never decays is a tax; failing goal alignment makes it a dark pattern.

What's in the repo

Path
dcd/SKILL.md the skill: workflow, tie-breakers, smells, output formats
dcd/references/contract.md the six properties with pass/fail tests, and the three-phase envelope in numbers
dcd/references/web.md CSS/JS, Vibration API, Web Audio, prefers-reduced-motion, latency budgeting
dcd/references/ios.md UIFeedbackGenerator, Core Haptics, SwiftUI sensoryFeedback
dcd/references/android.md HapticFeedbackConstants, VibrationEffect, Compose
dcd/references/react-native.md expo-haptics, Reanimated, cross-platform fallbacks
dcd/references/dark-pattern-inversions.md nine dark patterns, the mechanism each uses, and its educational inversion
dcd/references/ab-test.md two-group protocol, recruitment, outcomes, sample size, falsification
dcd/assets/dcd-spec.md the per-error-point spec template

The paper follows in full.


Directional Cognitive Discomfort: Aversive Feedback as an Error-Correction Signal in Human–Computer Interaction

Mukhammadyusuf Abdurakhimov
OQIM GROUP LLC, Tashkent, Uzbekistan
yusuf@oqim.app

Abstract

Mainstream user-experience practice treats comfort as the primary objective of interface design: reduce friction, minimize cognitive load, reward completion. This paper argues that the comfort-maximizing framing is incomplete. Drawing on the evolutionary priority of affect over cognition, the free-energy formulation of biological learning, and the demonstration that in vitro neuronal cultures learn a sensorimotor task when errors are signaled by unpredictable stimulation, we propose directional cognitive discomfort (DCD): a brief, localized, proportional, and goal-aligned aversive signal delivered at the moment of an erroneous action. We formalize six properties a discomfort signal must satisfy to function as a learning gradient rather than as noise or punishment, and show that the engineering contract recently specified for closed-loop interaction with biological neural networks—temporally and structurally consistent stimulation with bounded latency and deterministic ordering—is the same contract an interface must honor for its error feedback to register as a signal at all. We map the properties onto haptic, auditory, visual, and temporal modalities, invert nine dark patterns into educational mechanisms, analyze existing interface patterns through the framework, and specify a two-group experimental protocol for testing whether DCD reduces error recurrence relative to conventional informational feedback. We close with an ethical boundary condition distinguishing DCD from manipulation: discomfort is legitimate only when it is aligned with the user’s own goal.

1. Introduction

The dominant vocabulary of user-experience design—“frictionless,” “delightful,” “effortless”—encodes a single-valued objective: make the user feel good. This is not wrong. Comfort on the happy path is what makes a system usable at scale, and decades of usability research support reducing unnecessary effort[15, 16].

But interfaces do not only need to be traversed; they need to be learned. A user who completes a task comfortably but repeats the same mistake on the next attempt has not acquired the system’s model. Learning, in biological systems, is not driven primarily by comfort. It is driven by the organism’s drive to escape states it registers as aversive, uncertain, or incoherent. Comfort marks the destination; discomfort supplies the gradient.

This paper takes that observation seriously as a design principle. The central claim is narrow: a well-formed aversive signal at the moment of an incorrect action teaches faster and more durably than a neutral informational message, provided the signal is directional, immediate, proportional, formally consistent, and aligned with the user’s own goal. The paper does not argue for discomfort in general, for punishment, or for friction as a business lever. It argues for discomfort as information—specifically, the kind of information that biological learners are evolutionarily equipped to act on.

The paper makes four contributions:

  1. A four-stage neural account of how an erroneous action becomes a corrected policy, with an interface-level analogue at each stage (Section 3).

  2. A formal specification of six properties a discomfort signal must satisfy, presented as a contract in the sense used by Hogan et al.[9] for biological neural networks (Section 4).

  3. A systematic inversion of dark patterns into educational mechanisms, with choice-architecture rules for learning contexts (Section 7).

  4. A minimal two-group protocol and a full five-condition program for empirical test, including falsification criteria (Section 8).

2. Background

2.1 Affect precedes cognition

Across the evolutionary record, the capacity to register valence—approach versus avoid—appears long before anything resembling deliberative reasoning. Unicellular organisms exhibit chemotaxis, moving up gradients of nutrients and away from toxins, without any nervous tissue. In organisms with nervous systems, subcortical affective circuits are phylogenetically older than cortical structures and modulate them[17, 13]. Damasio’s somatic marker hypothesis[4] proposes that even in humans, decision-making under uncertainty is steered by bodily affective states that tag options as good or bad before conscious evaluation completes. Solms[21] pushes further: feeling is not a layer on top of intelligence but the foundation beneath it, arising directly from the homeostatic drive to stay alive.

The implication for interface design is that the fastest channel into a user’s behavior is not the informational channel (read this error message) but the affective one (feel that this was wrong). The two are not exclusive, but the affective channel operates earlier and requires less attention.

2.2 The free-energy formulation of learning

Friston’s free-energy principle[6] frames adaptive systems as minimizing surprise—formally, minimizing variational free energy, an upper bound on the improbability of sensory states given the system’s model. A system does this either by updating its model (perception) or by acting on the world to make sensations conform to its predictions (action). Under this framing, an aversive signal need not be “painful” in any felt sense; it is any input that is unpredictable relative to the system’s model. The organism acts to restore predictability. Isomura et al.[10] showed that cultured cortical neurons perform blind source separation in a manner consistent with this principle.

2.3 Biological computing: learning from unpredictability

The most direct empirical support for the design thesis comes from the DishBrain experiments[11]. Roughly 800,000 human and mouse cortical neurons were cultured on high-density microelectrode arrays and embedded in a closed-loop simulation of Pong. Electrodes signaled ball position; the culture’s activity moved the paddle. Crucially, the training signal was not a dopamine reward but a manipulation of predictability: when the paddle hit the ball, the culture received a predictable, spatially and temporally consistent stimulation; when it missed, it received an unpredictable, random stimulation. Over sessions, the cultures increased rally length. The interpretation, consistent with the free-energy principle, is that the only route to a more predictable input stream was to play better. Subsequent work established that structured information presentation drives the cultures toward critical dynamics[8] and that their sample efficiency compares favorably with deep learning systems[12].

Three features of this result matter for HCI:

  1. The aversive signal was structured unpredictability, not intensity. Cells were not “hurt.” The world became briefly incoherent.

  2. The signal was immediate and contingent on the specific action.

  3. The signal carried no explicit instruction. There was no “you should have moved left.” The gradient was learned from the contingency between action and the coherence of the subsequent world.

DishBrain is a limited system—it learned slowly and never played well—but it is a clean existence proof that a learner with no cortex, no language, and no concept of a rule can improve at a task when errors are marked by loss of predictability.

2.4 Neural signatures of error in humans

Humans possess a dedicated, rapid, pre-conscious error-detection response. The error-related negativity (ERN) is an event-related potential arising in anterior cingulate cortex roughly 50–100 ms after an erroneous action, before the person is consciously aware of the error[7, 5]. The ERN is followed by the error positivity (Pe), associated with conscious error awareness, and by post-error slowing—an automatic increase in caution on the next trial[18]. The ERN is modulated by motivational significance: larger when errors matter more.

This system is precisely the biological receptor for a discomfort-based feedback design. An interface that delivers an aversive cue in the same window in which the ERN is generated is reinforcing an existing internal signal rather than fighting for attention.

2.5 Related HCI work

Several strands of HCI literature approach the same territory without naming it: confirmation and friction for destructive actions (type-to-confirm, hold-to-delete, undo windows); multimodal error feedback such as platform-level failure haptics and the password-field shake; game feel or “juice”[22], the practice of making failed actions feel immediately and viscerally wrong; desirable difficulties in educational psychology[1]; and nudge theory together with its critique in the dark-patterns literature[23, 2]. What is missing is a unifying account of when discomfort teaches and when it merely annoys, and a set of properties the signal must satisfy.

3. How the Brain Formulates the Signal

The design principle rests on a specific neural sequence (Figure 1). Each stage has an interface-level analogue.

The error-correction loop. An interface signal enters at the prediction-error stage; its job is to make the mismatch louder and earlier, not to explain it. The return path lowers the precision assigned to the failed policy before the next action.

The error-correction loop. An interface signal enters at the prediction-error stage; its job is to make the mismatch louder and earlier, not to explain it. The return path lowers the precision assigned to the failed policy before the next action.

Stage 1 — Prediction. Under predictive-processing accounts[19, 3], every motor act is issued alongside a prediction of its sensory consequences. Pressing “submit” carries an expectation of what the next screen will be. The prediction is hierarchical: low levels predict pixels and haptics, higher levels predict task state (“the form is accepted”).

Stage 2 — Prediction error. A mismatch generates an error signal proportional to the discrepancy and weighted by precision—the system’s confidence in its own prediction. In humans the ERN arises in anterior cingulate cortex roughly 50–100 ms after an erroneous response, prior to conscious awareness. The Pe follows at 200–400 ms and correlates with awareness. This is the window an interface signal must hit: a cue landing at 100 ms reinforces an existing internal signal; one at 800 ms competes with the next action.

Stage 3 — Affective tagging. The error is assigned valence. Insular cortex and amygdala participate in marking the state as aversive, and the lateral habenula suppresses dopaminergic signaling in response to worse-than-expected outcomes[14]. Whether or not one accepts Solms’s strong claim that this layer is the origin of consciousness, the weak claim suffices for design: affect is the channel that converts “different from expected” into “move away from this.”

Stage 4 — Precision update and policy adjustment. The system lowers the precision it assigns to the just-used policy. Behaviorally this appears as post-error slowing and, over trials, as a shift in action selection. Dopaminergic reward-prediction-error[20] and aversive prediction-error signals jointly reshape the value of the action. Learning is therefore gradient-based and cumulative, which is why the design target is reduced recurrence rather than one-shot elimination.

3.1 What the biological-computing literature adds

In the cultured-neuron system the affective stage is absent or minimal; what remains is stages 1, 2, and 4 in their most stripped-down form. The training signal works directly on prediction error: unstructured input is maximally unpredictable, so the only route to lower error is a better policy.

The CL API paper by Hogan et al.[9] makes the engineering precondition explicit, and its framing transfers almost verbatim to interface design. Its opening claim is that biological neural networks can only function as reliable information-processing systems if inputs are delivered in a temporally and structurally consistent manner; every input—subcomponent count, duration, amplitude, polarity, and timing—must be precisely enacted. The paper’s solution is a programming contract: a specification of the guarantees a user may rely on (timing, ordering, synchronization, failure semantics) independent of implementation. Four elements of that contract have direct HCI analogues:

  • Reliability over accuracy. The authors state that whether a stimulation pulse is exactly 1.1 $\mu$A or 1.2 $\mu$A is secondary to ensuring the delivered current is identical across every trial. The interface corollary: the exact form of an error cue matters less than its being identical on every occurrence.

  • Bounded latency, not low average latency. The contract defines real-time as defined temporal correctness rather than merely low average latency, with stimulation beginning 80–120 $\mu$s after a call and closed-loop iteration up to 25 kHz. The interface corollary: an onset budget is a hard per-event deadline, not a mean.

  • Jitter is detected and raised, never silently accumulated. When a loop iteration exceeds its budget the system raises a TimeoutError rather than allowing drift. The interface corollary: feedback that sometimes arrives late should be treated as a defect, because from the learner’s side late feedback is attributed to the wrong action.

  • Atomic admission. Stimulation plans are admitted entirely or not at all. The interface corollary: the onset, sustain, and resolution phases of a signal are one unit; a partial signal (onset without resolution) is worse than none.

The general lesson is that consistency of the feedback channel is not a refinement on top of a learning signal; it is the precondition for the channel to carry a signal at all.

3.2 Habituation as precision down-weighting

When aversive input is repeated without any available policy that reduces it, the system lowers the precision of that input channel; it stops listening. This is the same mechanism as banner blindness, and it is why directionality and goal alignment (Section 4) are not merely ethical constraints but functional ones: a signal the user cannot escape by acting correctly is, from the brain’s side, indistinguishable from noise and will be attenuated.

4. Theoretical Framework: Directional Cognitive Discomfort

We define directional cognitive discomfort (DCD) as an interface-generated aversive signal that (a) is contingent on a specific user action the system classifies as erroneous, and (b) is constructed so that the fastest way for the user to make the signal stop is to perform the correct action.

The second clause is what distinguishes DCD from generic negative feedback. A red error banner that persists until the user reads it is aversive but not directional—the escape route is reading, not correcting. A haptic pulse localized to the field that is wrong, ceasing the instant the field becomes valid, is directional.

4.1 The DCD contract

Following the contract framing of[9], Table 1 specifies the guarantees a DCD signal must provide, the assumptions under which they hold, and the failure mode when each is violated.

Table 1: The six properties of a well-formed discomfort signal, presented as a contract.

Item Property Guarantee, assumption, and failure mode
P1 Immediacy The signal onset arrives within the window in which the user’s own error monitoring is active, on the order of 100–300 ms from the action. This is a per-event deadline, not a mean. Failure mode: delayed discomfort is attributed to the system rather than to the action.
P2 Locality The signal is spatially or semantically co-located with the erroneous action: the wrong field, control, or gesture. Failure mode: global discomfort produces search cost and anxiety rather than correction.
P3 Directionality The signal decreases monotonically as the user approaches the correct state and vanishes when it is reached. This is the gradient condition. Failure mode: the user learns that they erred but not which way to move; the signal degrades to a warning.
P4 Proportionality Signal magnitude scales with error cost. A mistyped character warrants a subtler cue than a destructive action. Failure mode: disproportionate discomfort is registered as hostility and triggers disengagement.
P5 Formal predictability The signal is identical in form, channel, and latency across occurrences, so that the user’s model of the feedback is stable even as the world it reports on is briefly unstable. Failure mode: a feedback vocabulary that itself varies becomes noise and is attenuated.
P6 Goal alignment The signal serves a goal the user holds. Failure mode: discomfort applied to actions the user wants but the operator does not (cancelling, declining, leaving) is manipulation; the signal is rated hostile and habituates.

A signal satisfying P1–P6 functions as a learning gradient. A signal failing P3 is a warning. A signal failing P6 is a dark pattern.

4.2 Why “never make the mistake again” is the wrong target

The intuitive goal—one-shot elimination of the error—is not how biological learning works and should not be the design target. DishBrain improved gradually over sessions. Human post-error adjustment is a probabilistic shift, not a rule installation. The realistic targets are reduced error recurrence rate over a session and across sessions, reduced time-to-recovery after an error, and reduced re-read dependence (the user corrects without consulting the message). Designing for one-shot elimination pushes toward disproportionate signals (violating P4) that habituate rapidly.

5. Design Space

5.1 Modalities

Table 2 maps modalities to the properties each naturally satisfies.

Table 2: Modalities for the comfort path and for the DCD signal.

Modality Comfort-path signal DCD signal Satisfies Risks
Haptic Short, clean tap on success Rough or asymmetric pulse on error, localized where hardware allows P1, P2, P5 Confusable with notifications; device variance
Auditory Rising or resolved tone Dissonant, unresolved, or truncated tone P1, P5 Social cost in public; accessibility
Visual, motion Settle, ease-in Shake, jitter, snap-back P1, P2 Overuse reads as unstable software
Visual, static Neutral state Desaturation, field highlighting, blocked affordance P2, P3 Persists past correction, violating P3
Temporal Immediate response Deliberate delay, hold-to-confirm, cooldown P4 Perceived as slowness; easily misused (P6)
Structural Free navigation Locked progression until correction P3 Overuse produces learned helplessness

5.2 Timing structure

A DCD signal has three phases (Figure 2):

  1. Onset (0–150 ms after error): sharp, low-information, co-located. Purpose: engage error monitoring.

  2. Sustain (until correction begins): low-amplitude, continuous, directional—a persistent subtle state that eases as the user moves toward the valid state. Purpose: supply the gradient.

  3. Resolution (on reaching the valid state): immediate cessation plus a brief comfort signal. Purpose: mark the destination and close the loop.

Most existing implementations have an onset and nothing else. The sustain phase is where directionality lives and is the least explored.

The three-phase envelope of a directional discomfort signal against a predictable baseline. The sustain phase eases as the input approaches validity; resolution is instantaneous and is followed by a brief comfort cue.

The three-phase envelope of a directional discomfort signal against a predictable baseline. The sustain phase eases as the input approaches validity; resolution is instantaneous and is followed by a brief comfort cue.

5.3 The comfort/discomfort ratio

Discomfort is only interpretable against a background of comfort. If the baseline texture of an interface is itself noisy, error signals have no contrast. Practically: the happy path must be almost boringly predictable—same timings, same easings, same sounds—so that a deviation is unmistakable. Comfort is not abandoned; it is repurposed as the carrier wave.

6. Case Analyses

macOS login shake. On an incorrect password, the field shakes horizontally and returns to rest. Satisfies P1, P2, P4, P5. Fails P3 (no gradient—the signal is identical regardless of how close the guess was, which is correct for security but means it teaches nothing beyond “wrong”). Goal-aligned (P6).

Platform failure haptic with form validation. The system-level error haptic is immediate and formally consistent (P1, P5) but not localized (P2 fails on devices without localized actuation) and not directional (P3). Its main value is engaging error monitoring at the right instant; the visual layer must carry the gradient.

Language-learning wrong-answer tone. Immediate, formally stable, proportionate. Paired with an explanation, so the informational channel supplies direction. Goal-aligned. This is close to a full DCD implementation; its weakness is that the tone is global rather than localized.

Type-to-confirm deletion. A temporal/structural DCD. Satisfies P4 (proportionate to irreversibility) and P6. Directional in the trivial sense that the friction resolves only via the deliberate path. Correct use of discomfort as a cost that protects the user’s own interest.

Subscription cancellation with retention friction. Structurally identical to the previous case—added steps, delays, confirmations—but the goal being served is the operator’s. Fails P6 categorically. This is the clearest illustration that the mechanism is neutral; only alignment determines whether it is teaching or manipulation.

Game feel. Failed jumps, blocked moves, and misses in well-designed games are accompanied by immediate, localized, proportionate, formally consistent feedback that resolves the instant the correct action is taken. Games are the most mature DCD practitioners precisely because their users are voluntarily learning and the goal alignment is total.

7. Inverting Dark Patterns for Educational Use

Dark patterns are well-formed friction and discomfort signals pointed at the operator’s goal. The mechanism is neutral; the alignment is not. Table 3 gives an educational inversion for each of nine common patterns that preserves the mechanism and flips P6.

Table 3: Dark patterns and their educational inversions.

Dark pattern Mechanism Educational inversion Property
Roach motel Asymmetric friction Hold-to-confirm and type-to-confirm on irreversible or costly actions P4
Confirmshaming Affective cost on the exit option Consequence preview: state the real, user-relevant cost of skipping, in neutral language, before commitment P6, P2
Forced continuity Locked progression Prerequisite gating: the next module opens only after the skill is demonstrated, with the gate visibly tied to the user’s own goal P3
Nagging Repeated interruption Spaced-repetition prompts scheduled from the user’s own error history, decaying to zero as recurrence drops P5
Misdirection Visual salience steering Post-error salience: after an error, make the correct affordance visually dominant and the incorrect one recede for one interaction P2, P3
Trick questions Induced uncertainty Deliberate disambiguation: a commonly mis-set control is presented with an explicit state preview and a brief pause before taking effect P1, P5
Sneak into basket Silent state change Loud state change: any system-initiated change to user state gets an unmissable, dismissible, undoable signal P1, P6
Fake scarcity Manufactured time pressure Real deadline surfacing: only when the deadline is genuine and belongs to the user’s task P6
Bait and switch Expectation violation at commit Commit preview: show the exact outcome of the action before it is taken, so prediction and result match Stage 1

7.1 Choice-architecture rules for learning contexts

  1. Never remove or hide an option. The user must always be able to take the “wrong” path; otherwise nothing is learned.

  2. Make the cost of the wrong option felt before commitment, not after, and only when the cost is real for the user.

  3. Discomfort attaches to the action, never to the person. “This will delete your draft” teaches; “Are you sure you want to lose your work?” shames.

  4. Friction must decay with competence. A hold-to-confirm that never shortens is a tax; one that shortens after the user has demonstrated the correct pattern three times is a scaffold.

  5. Every friction element must have a visible, honest reason in the interface. Unexplained friction is experienced as hostility regardless of intent.

7.2 Worked examples

A form field with a hard format constraint. Dark version: accept the input silently, reject at submit with a generic error, make the user hunt for the field. Educational version: on the first invalid keystroke pattern, a brief localized haptic and a subtle visual state on that field (onset); as the input approaches a valid pattern the state eases (sustain); on validity, the state clears instantly with a soft confirmation (resolution). On the second exposure in a later session, the onset fires only if the same error recurs, and the sustain is omitted if the user corrects within 500 ms.

A safety-critical toggle in a field-documentation application. The toggle controls whether captured records are marked final. Dark version: default to final, bury the toggle. Educational version: the toggle is prominent, its current state is previewed in plain language, switching it to final triggers a proportionate confirmation (hold, 600 ms) with the consequence stated, and the hold duration shortens to 250 ms after the user has completed the pattern correctly several times.

8. Experimental Program

8.1 The minimal two-group test

The five-condition design in Section 8.3 is the full program. The minimal viable test is two groups, one desired action, two sessions (Figure 3).

Minimal two-group design. Both groups are drawn from the same task-novice pool and differ only in feedback; the primary outcome is recurrence of the target error in session 2.

Minimal two-group design. Both groups are drawn from the same task-novice pool and differ only in feedback; the primary outcome is recurrence of the target error in session 2.

Who to recruit. Task novices: people with no prior exposure to the specific task, product, or interaction pattern under test. Experts are excluded, not because they are hard to recruit but because they have already built the model the signal is meant to install; a learning signal has nothing to teach them and the effect size collapses. General-population samples without screening mix the two and add variance. Screen with a two-item prior-exposure check and a short pre-task in which the baseline error rate must exceed a threshold (e.g., at least one error on the target action in the first three attempts).

Where they come from. One population, one recruitment channel, one time window. Both groups must be drawn from the same pool and differ only in feedback. Stratify the randomization on the variables most likely to affect the target action: device class (haptic capability varies), age band, and self-reported familiarity with the interface family.

Group A — informational control. On the erroneous action the interface shows a neutral text message with the same informational content as Group B. No haptic, no sound, no motion, no localized visual state. This is the industry default.

Group B — directional discomfort. Same text message plus the DCD envelope: onset (localized haptic or motion, under 150 ms), sustain (localized visual state that eases as the input approaches validity), resolution (instant clearance plus a soft confirmation cue). Formally identical across all occurrences.

The desired action. must be a single, observable, repeatable behavior with a clear correct/incorrect boundary. Good candidates: entering a constrained identifier correctly; selecting the correct one of two easily confused controls; completing a required confirmation step before a destructive action. Poor candidates: anything with a fuzzy correctness criterion, anything the user would only do once, anything where the “correct” action is the operator’s preference rather than the user’s goal.

Primary outcome. Error recurrence on the target action in session 2, held 24–72 hours after session 1. This is the learning measure. Session-1 completion rate is not the primary outcome; both groups will complete.

Secondary outcomes. Time-to-recovery after an error; number of errors before first correct action in session 1; whether the user consulted the text message (reveal interaction or eye tracking); post-error slowing on the next field; a two-item helpful/hostile rating of the feedback; the System Usability Scale.

Sample size. For a medium effect (Cohen’s $d \approx 0.5$) on session-2 recurrence at $\alpha = 0.05$ and 80% power, roughly 64 per group; plan for 80 per group to absorb session-2 attrition. If the pilot suggests a smaller effect, shift to a within-subject design with counterbalanced target actions rather than simply increasing $n$.

What would falsify the thesis. No difference in session-2 recurrence; a difference driven entirely by Group B avoiding the interaction rather than performing it correctly (check completion and abandonment rates); or a helpful/hostile rating that skews hostile for Group B despite P6 compliance.

8.2 Hypotheses

  • DCD-compliant feedback yields lower session-2 error recurrence than informational feedback of equal content.

  • The effect persists across a 24–72 hour gap.

  • Removing directionality (P3) while retaining immediacy and locality eliminates most of the H1 effect.

  • Violating proportionality (P4) reduces completion and satisfaction without improving recurrence beyond the P4-compliant condition.

  • Participants rate P6-compliant discomfort as helpful and P6-violating discomfort of identical form as hostile.

8.3 Full five-condition design

Between-subjects on a form-completion and structured-entry task with fixed error-prone fields: (1) neutral text feedback; (2) full DCD; (3) DCD minus directionality (onset only); (4) DCD with disproportionate magnitude; (5) DCD applied to an operator-favored action the user is entitled to skip. Predictions: 2 outperforms 1 on recurrence and recovery; 3 approaches 1; 4 matches 2 on recurrence but underperforms on satisfaction and completion; 5 is rated hostile despite formal identity with 2. Where available, EEG ERN/Pe amplitude serves as a manipulation check that the feedback engages error monitoring.

8.4 Applying the framework in a product

  1. Inventory error points. List every interaction where users take an incorrect action that costs them something. Rank by cost $\times$ frequency.

  2. Classify each by correctness type. Continuous (a value approaches validity) versus discrete (right or wrong). Continuous errors get a true sustain phase; discrete errors get onset plus post-error salience on the correct alternative.

  3. Fix the happy-path baseline first. Same timings, easings, sounds, and haptics everywhere on the successful path. Without a predictable baseline, discomfort has no contrast.

  4. Design the envelope per error point. Choose modality by device capability and context. Set magnitude by error cost. Write the resolution cue.

  5. Verify feedback consistency at the engineering level. Latency budget under 150 ms from action to onset as a per-event deadline; identical form on every occurrence; no dependence on network round-trips for the onset phase; late or partial signals logged as defects.

  6. Add decay. Friction and signal magnitude reduce after the user demonstrates the correct pattern a set number of times.

  7. Run the two-group test on the highest-ranked error point before rolling out.

  8. Audit for P6 on every element. If any discomfort serves the operator over the user, remove it.

9. Ethics and Boundary Conditions

The mechanism described here is the same mechanism exploited by dark patterns. That is not an incidental resemblance; it is the same lever. The framework’s ethical content is entirely contained in P6 and in two corollaries. First, discomfort must be attached to actions, never to identity: signals that make the user feel incompetent rather than the action feel incorrect produce avoidance of the system, not learning. Second, discomfort must be escapable by doing the right thing: a signal that persists after correction, or that can only be silenced by an action the user did not want, has stopped being a gradient.

Accessibility is a further constraint. Vestibular sensitivity, hearing impairment, and anxiety-related conditions change how aversive signals land; every DCD channel needs an equivalent that respects reduced-motion and reduced-sound preferences without losing directionality.

10. Limitations

The DishBrain analogy is an existence proof, not a mechanism transfer. In vitro cultures have no attention, no habituation dynamics comparable to a human’s, no social context, and no capacity to disengage. The human error-monitoring literature supplies the bridge, but the specific claim—that interface-level aversive feedback engages ERN-linked adjustment more effectively than neutral feedback—is a hypothesis this paper proposes rather than a result it reports.

The framework also under-specifies the sustain phase in practice. Directional visual states that ease with proximity to validity are straightforward for continuous inputs (sliders, drag targets) and awkward for discrete ones. Directionality in discrete spaces may need to be carried by ordering and proximity of alternatives rather than by signal amplitude.

11. Conclusion

Comfort is the right objective for the happy path and the wrong objective for the moment of error. Biological learners—from cultured neurons to humans—acquire skill by acting to escape states that are unpredictable, incoherent, or aversive, and they are equipped with fast affective machinery that detects errors before cognition does. Interfaces that speak only to the informational channel at the moment of error leave that machinery idle. Directional cognitive discomfort proposes to engage it: briefly, locally, proportionately, in a consistent form, with a gradient that leads to the correct state, and only ever in service of the user’s own goal. The last condition is not a footnote. It is the difference between a teacher and a trap.

References

  1. R. A. Bjork. Memory and metamemory considerations in the training of human beings. In J. Metcalfe and A. Shimamura, editors, Metacognition: Knowing about Knowing. MIT Press, 1994.

  2. H. Brignull. Dark patterns: Deception vs. honesty in UI design. A List Apart, 2010.

  3. A. Clark. Whatever next? Predictive brains, situated agents, and the future of cognitive science. Behavioral and Brain Sciences, 36(3):181–204, 2013.

  4. A. R. Damasio. Descartes’ Error: Emotion, Reason, and the Human Brain. Putnam, 1994.

  5. M. Falkenstein, J. Hohnsbein, J. Hoormann, and L. Blanke. Effects of crossmodal divided attention on late ERP components. II. Error processing in choice reaction tasks. Electroencephalography and Clinical Neurophysiology, 78(6):447–455, 1991.

  6. K. Friston. The free-energy principle: A unified brain theory? Nature Reviews Neuroscience, 11(2):127–138, 2010.

  7. W. J. Gehring, B. Goss, M. G. H. Coles, D. E. Meyer, and E. Donchin. A neural system for error detection and compensation. Psychological Science, 4(6):385–390, 1993.

  8. F. Habibollahi et al. Critical dynamics arise during structured information presentation within embodied in vitro neuronal networks. Nature Communications, 14:5287, 2023.

  9. D. Hogan, A. Doherty, B. K. Khoo, J. Zhou, R. Salib, J. Stewart, K. Lawson, A. Loeffler, and B. J. Kagan. CL API: Real-time closed-loop interactions with biological neural networks. arXiv:2602.11632, 2026.

  10. T. Isomura, K. Kotani, and Y. Jimbo. Cultured cortical neurons can perform blind source separation according to the free-energy principle. PLOS Computational Biology, 11(12):e1004643, 2015.

  11. B. J. Kagan, A. C. Kitchen, N. T. Tran, F. Habibollahi, M. Khajehnejad, B. J. Parker, A. Bhat, B. Rollo, A. Razi, and K. J. Friston. In vitro neurons learn and exhibit sentience when embodied in a simulated game-world. Neuron, 110(23):3952–3969.e8, 2022.

  12. M. Khajehnejad et al. Dynamic network plasticity and sample efficiency in neural cultures: A comparison with deep learning. Cyborg and Bionic Systems, 2025.

  13. J. LeDoux. The Emotional Brain. Simon & Schuster, 1996.

  14. M. Matsumoto and O. Hikosaka. Lateral habenula as a source of negative reward signals in dopamine neurons. Nature, 447(7148):1111–1115, 2007.

  15. J. Nielsen. Usability Engineering. Morgan Kaufmann, 1994.

  16. D. A. Norman. The Design of Everyday Things, revised edition. Basic Books, 2013.

  17. J. Panksepp. Affective Neuroscience: The Foundations of Human and Animal Emotions. Oxford University Press, 1998.

  18. P. M. A. Rabbitt. Errors and error correction in choice-response tasks. Journal of Experimental Psychology, 71(2):264–272, 1966.

  19. R. P. N. Rao and D. H. Ballard. Predictive coding in the visual cortex. Nature Neuroscience, 2(1):79–87, 1999.

  20. W. Schultz, P. Dayan, and P. R. Montague. A neural substrate of prediction and reward. Science, 275(5306):1593–1599, 1997.

  21. M. Solms. The Hidden Spring: A Journey to the Source of Consciousness. Norton, 2021.

  22. S. Swink. Game Feel: A Game Designer’s Guide to Virtual Sensation. Morgan Kaufmann, 2008.

  23. R. H. Thaler and C. R. Sunstein. Nudge: Improving Decisions About Health, Wealth, and Happiness. Yale University Press, 2008.

About

Directional Cognitive Discomfort — an agent skill for error feedback that teaches the correct action, plus the paper behind it

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors