DOCS
v0.4

Cognitive Psychology & Design

Cognivo integrates 184 cognitive biases into the design workflow — not as an afterthought, but as a core architectural layer. Every component, every pattern, every design decision can be traced back to how the human brain actually processes information.

Why Cognitive Psychology in a Component Library?

Most design systems stop at visual consistency — colors, spacing, typography. But the highest-performing interfaces understand how people think, not just what they see.

Users don't make rational decisions. They rely on mental shortcuts (heuristics), fall prey to systematic errors (biases), and process information through predictable cognitive patterns. Cognivo makes these patterns programmable.

01

Decision Architecture

How you present choices changes what people choose. Anchoring, framing, and decoy effects are not tricks — they're how the brain works. Cognivo helps you design with this, not against it.

02

Cognitive Load Management

Working memory holds ~4 items. Every unnecessary element competes for attention. Our token system, component states, and layout patterns are designed to minimize cognitive overhead.

03

Trust & Credibility

AI interfaces have a unique trust problem. Users need to calibrate confidence in machine outputs. Our confidence sliders, source citations, and reasoning trees make AI transparent.

04

Behavioral Outcomes

Every UI interaction triggers cognitive biases. Loss aversion drives urgency. Social proof drives adoption. The Von Restorff effect drives attention. Cognivo maps these to components.

The 7 Bias Categories

184 biases organized into 7 categories that map to different stages of the user journey:

42

Decision

Anchoring, framing, decoy effect, loss aversion, sunk cost. How users evaluate options and make choices.

31

Memory

Primacy/recency, serial position, spacing effect, Von Restorff. How users remember and recall information.

28

Social

Social proof, authority bias, bandwagon effect, in-group favoritism. How others influence user behavior.

25

Attention

Change blindness, inattentional blindness, banner blindness, selective attention. What users notice and miss.

22

Perception

Gestalt principles, aesthetic-usability effect, peak-end rule, halo effect. How users interpret visual information.

20

Learning

Progressive disclosure, chunking, scaffolding, dual coding. How users acquire and process new information.

16

Motivation

Endowment effect, IKEA effect, goal gradient, variable reward. What drives users to take action.

How It Works in Practice

The design advisor isn't a separate tool — it's woven into how you build interfaces.

1. Query biases for your context

Building a pricing page? Ask the advisor which cognitive biases are relevant:

import { queryBiases, recommendBiases } from '@cognivo/design-advisor';

// What biases matter for pricing pages?
const biases = queryBiases({
  tags: ['pricing', 'conversion', 'ecommerce'],
});
// → Anchoring Bias, Decoy Effect, Loss Aversion, Price-Quality Inference...

// Get actionable recommendations
const recs = recommendBiases({
  page: 'pricing',
  goals: ['increase conversion', 'reduce abandonment'],
});
// → Returns ranked biases with specific implementation steps

2. Map biases to components

Each bias connects to specific Cognivo components that implement it:

// Anchoring Bias → Show the highest price first
// Component: <ai-ab-test> for testing price anchors
// Component: <cg-metric-card> for displaying reference numbers

// Loss Aversion → Frame outcomes as losses, not gains
// Component: <ai-alert-card urgency="urgent"> for scarcity
// Component: <ai-countdown> for time-limited offers

// Social Proof → Show what others are doing
// Component: <ai-presence> for live user count
// Component: <cg-badge> for "Popular" / "Most chosen" labels

3. Audit your designs

Review any interface through a cognitive lens:

import { auditDesign } from '@cognivo/design-advisor';

const audit = auditDesign({
  components: ['ai-chat', 'cg-button', 'ai-confidence-slider'],
  context: 'AI assistant for financial advice',
});

// Returns:
// - Active biases (what's being triggered)
// - Missing opportunities (biases you could leverage)
// - Risk assessment (biases that might harm trust)
// - Ethical considerations per bias

Bias Card Structure

Each of the 184 biases is a richly structured object — not just a definition, but a complete design toolkit:

interface BiasCard {
  id: string;                          // 'anchoring-bias'
  name: string;                        // 'Anchoring Bias'
  category: BiasCategory;              // 'decision'
  description: string;                 // Full psychological description
  designImplications: string[];        // How it affects UI design
  useCases: UseCase[];                 // When to leverage it
  avoidCases: AvoidCase[];             // When NOT to use it
  realWorldExamples: RealWorldExample[];  // Apple, Amazon, Stripe examples
  implementationSteps: ImplementationStep[]; // Step-by-step guide
  accessibilityGuidelines: AccessibilityGuideline[];
  ethicalConsiderations: EthicalConsideration[];
  relatedBiases: string[];             // Connected biases
  tags: string[];                      // Searchable tags
  strength: 'strong' | 'moderate' | 'subtle';
  reversibility: 'reversible' | 'sticky' | 'permanent';
}

Real-World Examples

Every bias includes documented real-world examples from companies that use them effectively:

Anchoring Bias

Used by: Stripe, Apple, Salesforce

Show the enterprise plan first ($299/mo) so the team plan ($49/mo) feels like a deal. The first number anchors perception of value.

Loss Aversion

Used by: Booking.com, Amazon, Duolingo

"Only 2 left in stock" triggers loss aversion 2x stronger than the equivalent gain. Frame features as "Don't lose access to..." not "Gain access to..."

Social Proof

Used by: GitHub, Vercel, Linear

"Used by 100K+ developers" reduces evaluation friction. Real-time presence indicators ("3 people viewing") create urgency through social validation.

Von Restorff Effect

Used by: Notion, Figma, Slack

The one item that's visually different gets remembered. Accent colors, badges ("New", "Popular"), and visual breaks exploit this for CTAs and key features.

Installation & API

pnpm add @cognivo/design-advisor
import {
  // Direct bias access
  anchoringBias, lossAversion, socialProof,
  allBiases, getBiasById,

  // Search & query
  searchBiases, queryBiases, getBiasesByTag, getBiasesByCategory,

  // Recommendations
  recommendBiases,

  // Registry
  BiasRegistry, LazyBiasRegistry,

  // Audit
  auditDesign, getStatistics,
} from '@cognivo/design-advisor';

Web Components

Embed the bias library directly in your app with two components:

// Single bias card with full details
<bias-card bias-id="anchoring-bias"></bias-card>

// Full browsable library with search, filter, category navigation
<bias-library></bias-library>

The design-advisor data (184 bias cards) powers the composable wrappers under /biases.

The 6 composable cognitive-bias wrappers (bias-anchoring, bias-scarcity, bias-social-proof, bias-authority, bias-commitment, bias-reciprocity) are production-ready. See the Cognitive Biases section for per-wrapper playgrounds, API reference, and ethical use guidelines.

Ethical Framework

Every bias in the library includes ethical considerations. Cognivo distinguishes between:

Assistive Use

Leveraging biases to help users make better decisions — progressive disclosure reduces overwhelm, anchoring provides context.

Persuasive Use

Using biases to nudge users toward intended outcomes — social proof on pricing pages, scarcity on limited offers.

Manipulative Use

Exploiting biases against user interests — dark patterns, artificial scarcity, hidden costs. Flagged and documented as anti-patterns.

The design advisor flags when a bias application crosses from persuasive to manipulative, helping teams stay ethical while still building high-converting interfaces.