raven-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.js +629 -0
  5. package/dist/index.js.map +1 -0
  6. package/package.json +51 -0
  7. package/src/data/business/growth.json +48 -0
  8. package/src/data/business/metrics.json +48 -0
  9. package/src/data/business/monetization.json +56 -0
  10. package/src/data/business/onboarding.json +48 -0
  11. package/src/data/business/retention.json +48 -0
  12. package/src/data/patterns/cta.json +51 -0
  13. package/src/data/patterns/dashboard.json +51 -0
  14. package/src/data/patterns/empty-states.json +42 -0
  15. package/src/data/patterns/error-states.json +51 -0
  16. package/src/data/patterns/forms.json +53 -0
  17. package/src/data/patterns/landing-page.json +51 -0
  18. package/src/data/patterns/loading-states.json +51 -0
  19. package/src/data/patterns/mobile-conversion.json +51 -0
  20. package/src/data/patterns/modals-dialogs.json +51 -0
  21. package/src/data/patterns/navigation.json +50 -0
  22. package/src/data/patterns/pricing-page.json +59 -0
  23. package/src/data/patterns/signup-flow.json +52 -0
  24. package/src/data/patterns/social-proof.json +49 -0
  25. package/src/data/principles/accessibility.json +151 -0
  26. package/src/data/principles/color-theory.json +100 -0
  27. package/src/data/principles/d4d.json +113 -0
  28. package/src/data/principles/gestalt.json +129 -0
  29. package/src/data/principles/laws-of-ux.json +490 -0
  30. package/src/data/principles/mobile-ux.json +126 -0
  31. package/src/data/principles/nielsen-heuristics.json +258 -0
  32. package/src/data/principles/typography.json +117 -0
  33. package/src/data/tokens/registry.json +67 -0
  34. package/src/data/tokens/systems/linear.json +134 -0
  35. package/src/data/tokens/systems/stripe.json +147 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAA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AQ,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO;QACL,OAAO,EAAE,CAAC;gBACR,IAAI,EAAE,MAAe;gBACrB,IAAI;aACL,CAAC;KACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,uEAAuE;AAEvE,KAAK,UAAU,IAAI;IACjB,IAAI,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC3C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;AACjF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "raven-mcp",
3
+ "version": "1.0.0",
4
+ "description": "Design intelligence MCP server — principles, patterns, tokens, and strategy for AI-generated UI. 58 design principles, 13 UI patterns, 7 design system tokens.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "raven-mcp": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist/",
12
+ "src/data/",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc",
18
+ "dev": "tsx src/index.ts",
19
+ "start": "node dist/index.js",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "dependencies": {
23
+ "@modelcontextprotocol/sdk": "^1.12.1",
24
+ "zod": "^3.24.0"
25
+ },
26
+ "devDependencies": {
27
+ "typescript": "^5.7.0",
28
+ "tsx": "^4.19.0",
29
+ "@types/node": "^22.0.0"
30
+ },
31
+ "keywords": [
32
+ "mcp",
33
+ "design",
34
+ "design-system",
35
+ "tokens",
36
+ "ux",
37
+ "ui-patterns",
38
+ "principles",
39
+ "accessibility",
40
+ "claude",
41
+ "ai",
42
+ "model-context-protocol"
43
+ ],
44
+ "author": "Andrew Cunliffe",
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/rhinocap/raven-mcp"
49
+ },
50
+ "homepage": "https://ravenmcp.ai"
51
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "growth",
3
+ "name": "Growth Strategies",
4
+ "category": "business",
5
+ "summary": "Viral loops, referral mechanics, network effects, and organic growth patterns for digital products.",
6
+ "strategies": [
7
+ {
8
+ "name": "Viral loops (inherent virality)",
9
+ "description": "Product usage naturally exposes the product to non-users. The product is the marketing. Every user action has the potential to bring in new users without explicit referral effort.",
10
+ "when_to_use": "Products where the output is shared (documents, designs, links). Collaborative products where inviting others is part of the core workflow.",
11
+ "pitfalls": ["Viral loops that feel spammy ('X invited you!' emails)", "Forcing sharing as a gate to features (dark pattern)", "Virality that brings low-quality users who don't retain", "No onboarding for virally-acquired users (they arrive without context)"],
12
+ "examples": ["Figma: share a design link → viewer sees Figma branding → signs up", "Calendly: share scheduling link → recipient experiences the product", "Loom: share video → viewer sees Loom branding → records their own", "Notion: shared pages expose Notion to non-users"],
13
+ "metrics": ["viral coefficient (K-factor, target: >1.0 for viral growth)", "cycle time (days per viral loop)", "invitation rate (% of users who invite)", "invited-user activation rate"]
14
+ },
15
+ {
16
+ "name": "Referral programs",
17
+ "description": "Structured incentive programs that reward users for bringing in new users. Both referrer and referee receive a benefit. Must be easy to share and clearly valuable.",
18
+ "when_to_use": "Products with clear monetary value where a discount or credit is meaningful. Marketplaces and subscription products.",
19
+ "pitfalls": ["Incentive too small to motivate sharing", "Referral process too complex (long URLs, manual entry)", "One-sided rewards (only referrer benefits)", "Referral fraud and gaming", "Running out of budget on a viral referral program"],
20
+ "examples": ["Dropbox: 500MB free for referrer + referee (grew 3900%)", "Uber: free ride credit for both parties", "Morning Brew: tiered rewards (swag at milestones)"],
21
+ "metrics": ["referral rate (% of users who refer)", "referral conversion rate", "CAC from referrals vs paid acquisition", "LTV of referred users vs organic"]
22
+ },
23
+ {
24
+ "name": "Network effects",
25
+ "description": "The product becomes more valuable as more people use it. Direct network effects (more users = more value, like social networks) or indirect (more users = more content/integrations, like marketplaces).",
26
+ "when_to_use": "Products where user density or content volume drives value. Marketplaces, social products, and platforms.",
27
+ "pitfalls": ["Cold start problem — no value without users, no users without value", "Local network effects masquerading as global (valuable only within teams, not across platform)", "Network effects weakening as market saturates", "Negative network effects at scale (congestion, noise)"],
28
+ "examples": ["Slack: more team members → more conversations → more value", "Figma: more designers → more components shared → more templates available", "LinkedIn: more professionals → more job opportunities → more professionals"],
29
+ "metrics": ["network density", "cross-team adoption rate", "content created per user", "value per user as a function of total users"]
30
+ },
31
+ {
32
+ "name": "Content and SEO as growth engine",
33
+ "description": "User-generated or editorially-created content that ranks in search engines and brings organic traffic. The product's content IS the acquisition channel.",
34
+ "when_to_use": "Products that generate indexable content. Knowledge bases, template marketplaces, community forums.",
35
+ "pitfalls": ["Content without conversion paths (traffic but no signups)", "SEO-first content that's low quality (Google increasingly penalizes this)", "User-generated content quality issues", "Keyword cannibalization between pages"],
36
+ "examples": ["Notion: template gallery ranks for workflow searches", "Canva: design templates rank for 'resume template', 'poster maker'", "Stack Overflow: Q&A ranks for every programming question"],
37
+ "metrics": ["organic traffic growth rate", "content-to-signup conversion rate", "keyword rankings", "content volume growth"]
38
+ },
39
+ {
40
+ "name": "Product-led growth (PLG)",
41
+ "description": "The product itself drives acquisition, conversion, and expansion — without requiring sales teams for initial adoption. Users self-serve into the product, discover value, and expand usage.",
42
+ "when_to_use": "Products simple enough for self-serve onboarding. When end-users (not just buyers) influence purchasing decisions. Developer tools, design tools, and horizontal SaaS.",
43
+ "pitfalls": ["Underinvesting in onboarding — self-serve isn't self-explanatory", "No path from individual to team adoption (bottom-up to top-down)", "Pricing that doesn't scale with self-serve adoption", "No sales assist for enterprise deals that start PLG"],
44
+ "examples": ["Slack: team adoption → department → org-wide", "Figma: individual designer → design team → cross-functional", "Notion: personal notes → team wiki → company knowledge base"],
45
+ "metrics": ["product-qualified leads (PQLs)", "self-serve revenue %", "bottom-up expansion rate", "time-to-team-adoption"]
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "metrics",
3
+ "name": "Product Metrics Framework",
4
+ "category": "business",
5
+ "summary": "North star metrics, AARRR funnel, leading indicators, and measurement frameworks for product teams.",
6
+ "strategies": [
7
+ {
8
+ "name": "North Star Metric",
9
+ "description": "A single metric that best captures the core value your product delivers to customers. All team efforts should ultimately ladder up to moving this metric. It's not a revenue metric — it's a value metric that leads to revenue.",
10
+ "when_to_use": "Every product should have one. Define it early and revisit quarterly.",
11
+ "pitfalls": ["Choosing a vanity metric (pageviews, signups without activation)", "Choosing a lagging metric (revenue, NPS) instead of a leading one", "Metric that's too easy to game", "Metric that doesn't correlate with actual business outcomes", "Changing the North Star too frequently"],
12
+ "examples": ["Slack: daily messages sent (measures engagement value)", "Airbnb: nights booked (measures marketplace value)", "Figma: weekly active editors (measures creation value)", "Spotify: time spent listening (measures consumption value)"],
13
+ "metrics": ["North Star trend (weekly/monthly)", "input metrics that drive the North Star", "lag between input metrics and North Star movement"]
14
+ },
15
+ {
16
+ "name": "AARRR Pirate Metrics",
17
+ "description": "Dave McClure's framework: Acquisition → Activation → Retention → Revenue → Referral. Each stage has specific metrics. Identify the weakest stage and fix it — that's your biggest leverage point.",
18
+ "when_to_use": "Early-stage products finding product-market fit. Any product optimizing its funnel.",
19
+ "pitfalls": ["Optimizing all stages simultaneously instead of the bottleneck", "Focusing on acquisition when activation is the real problem", "Measuring stages in isolation instead of as a funnel", "Ignoring that stages interact (better activation improves retention)"],
20
+ "examples": ["Acquisition: signups, trial starts, app installs", "Activation: completed onboarding, reached aha moment, first core action", "Retention: DAU/MAU, D7/D30 retention, session frequency", "Revenue: conversion rate, ARPU, LTV, expansion revenue", "Referral: viral coefficient, referral rate, NPS"],
21
+ "metrics": ["funnel conversion rates between each stage", "stage-specific drop-off rates", "time spent in each stage", "bottleneck stage identification"]
22
+ },
23
+ {
24
+ "name": "Retention cohort analysis",
25
+ "description": "Track retention by signup cohort to see if product changes improve long-term usage. The most honest metric — it shows whether users stick around after the novelty wears off.",
26
+ "when_to_use": "Always. Retention curves are the single best indicator of product-market fit.",
27
+ "pitfalls": ["Looking only at aggregate retention (masks cohort differences)", "Not enough time to see long-term trends (need 3-6 months of data)", "Confusing retention with engagement (active doesn't mean valuable)", "Survival bias — only looking at retained users, not analyzing churned ones"],
28
+ "examples": ["D1, D7, D30 retention curves", "Cohort retention table (month of signup vs. month of activity)", "Feature-specific retention (users of feature X retain at Y%)", "Segment-specific retention (enterprise vs SMB)"],
29
+ "metrics": ["D1/D7/D30/D90 retention rates", "retention curve shape (flattening = product-market fit)", "cohort-over-cohort improvement", "resurrection rate (returning after dormancy)"]
30
+ },
31
+ {
32
+ "name": "Leading vs lagging indicators",
33
+ "description": "Leading indicators predict future outcomes (feature usage, activation rate, NPS). Lagging indicators measure past results (revenue, churn rate, LTV). Optimize leading indicators to improve lagging ones.",
34
+ "when_to_use": "When building OKRs, dashboards, and team metrics. Always prioritize leading indicators for team goals.",
35
+ "pitfalls": ["Setting team goals on lagging indicators (revenue) that they can't directly influence", "Mistaking a lagging indicator for a leading one", "Too many leading indicators — focus on 2-3 per team", "Leading indicators that don't actually lead (no causal relationship)"],
36
+ "examples": ["Leading: activation rate, feature adoption, NPS, time-in-product → Lagging: revenue, churn, LTV", "Leading: weekly active teams, integrations connected → Lagging: expansion revenue, net dollar retention", "Leading: support ticket volume, time-to-resolution → Lagging: churn rate"],
37
+ "metrics": ["leading indicator trends", "correlation between leading and lagging indicators", "time lag between leading change and lagging impact"]
38
+ },
39
+ {
40
+ "name": "Unit economics (LTV:CAC)",
41
+ "description": "The relationship between customer lifetime value (LTV) and customer acquisition cost (CAC). Healthy SaaS targets LTV:CAC of 3:1 or higher. CAC payback period should be under 12 months.",
42
+ "when_to_use": "When evaluating growth sustainability, marketing spend efficiency, and pricing strategy.",
43
+ "pitfalls": ["Calculating LTV with insufficient data (need 12+ months)", "Not segmenting LTV:CAC by channel and segment", "Ignoring CAC for organic/viral channels (it's not zero — there's product and engineering cost)", "Blended metrics hiding underperforming channels"],
44
+ "examples": ["LTV = ARPU × gross margin × (1/churn rate)", "CAC = total sales+marketing spend / new customers acquired", "CAC payback = CAC / (ARPU × gross margin)", "Target: LTV:CAC > 3:1, CAC payback < 12 months"],
45
+ "metrics": ["LTV:CAC ratio by segment and channel", "CAC payback period in months", "gross margin", "net dollar retention rate (>100% = expansion)"]
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "id": "monetization",
3
+ "name": "Monetization Strategies",
4
+ "category": "business",
5
+ "summary": "Pricing psychology, revenue models, and monetization patterns for digital products.",
6
+ "strategies": [
7
+ {
8
+ "name": "Freemium with usage limits",
9
+ "description": "Free tier with core functionality, paid tiers unlocked by usage volume (messages, storage, members, API calls). The free tier is the acquisition engine; limits create natural upgrade triggers.",
10
+ "when_to_use": "Products with clear usage-based value scaling. Works when free users provide network effects or social proof.",
11
+ "pitfalls": ["Free tier too generous — no incentive to upgrade", "Free tier too restrictive — users churn before seeing value", "Usage limits that feel arbitrary or punishing", "No clear upgrade path at the moment limits are hit"],
12
+ "examples": ["Slack (message history limit)", "Dropbox (storage limit)", "Zoom (40-min meeting limit)", "Notion (block limit on free)"],
13
+ "metrics": ["free-to-paid conversion rate (target: 2-5%)", "time-to-upgrade", "usage before upgrade trigger", "free user retention (leading indicator)"]
14
+ },
15
+ {
16
+ "name": "Freemium with feature gating",
17
+ "description": "Free tier with basic features, paid tiers unlock advanced features. Unlike usage limits, the free tier is fully functional for basic use — paid unlocks power features.",
18
+ "when_to_use": "Products where basic and advanced use cases are clearly segmented. When free users don't need and won't miss advanced features.",
19
+ "pitfalls": ["Gating too many features — free tier feels broken", "Gating the wrong features — core value must be free", "No preview of premium features — users don't know what they're missing", "Feature creep in the free tier eroding paid value"],
20
+ "examples": ["Figma (free: 3 files, paid: unlimited + libraries)", "GitHub (free: public repos, paid: private + actions)", "Canva (free: templates, paid: brand kit + resize)"],
21
+ "metrics": ["feature discovery rate", "premium feature trial conversion", "upgrade trigger feature usage"]
22
+ },
23
+ {
24
+ "name": "Free trial with paywall",
25
+ "description": "Full product access for a limited time (7, 14, or 30 days), then requires payment. No feature restrictions during trial — users experience full value.",
26
+ "when_to_use": "Products where full-feature experience is needed to understand value. High-ACV products where the conversion rate matters more than volume.",
27
+ "pitfalls": ["Trial too short — user doesn't reach aha moment", "Trial too long — user delays evaluation and forgets", "No onboarding during trial — user doesn't discover key features", "Requiring credit card upfront reduces trial starts by 60% but increases conversion rate"],
28
+ "examples": ["Netflix (30-day trial)", "Adobe Creative Cloud (7-day trial)", "Linear (14-day trial)"],
29
+ "metrics": ["trial start rate", "activation during trial", "trial-to-paid conversion (target: 15-25%)", "time-to-activation within trial"]
30
+ },
31
+ {
32
+ "name": "Per-seat pricing",
33
+ "description": "Price scales with the number of users/seats on the account. Revenue grows as the customer's team grows. Standard for B2B SaaS.",
34
+ "when_to_use": "Products where value scales with team size. When each user gets distinct value from their own seat.",
35
+ "pitfalls": ["Discourages adoption — teams share logins to save money", "No value for inactive seats — feels like waste", "Pricing cliff at team size thresholds", "Complexity of annual commits for growing teams"],
36
+ "examples": ["Slack ($7.25/user/mo)", "Jira ($7.75/user/mo)", "Figma ($15/editor/mo)"],
37
+ "metrics": ["seats per account", "seat expansion rate", "seat utilization (active/total)", "revenue per seat"]
38
+ },
39
+ {
40
+ "name": "Usage-based pricing",
41
+ "description": "Pay for what you use — API calls, compute minutes, messages sent, records processed. Revenue directly correlates with value delivered.",
42
+ "when_to_use": "Products where usage directly maps to value. When customers have highly variable usage patterns.",
43
+ "pitfalls": ["Unpredictable bills cause anxiety and churn", "New users afraid to experiment (fear of charges)", "Revenue volatility for the business", "Complex billing that's hard to understand"],
44
+ "examples": ["AWS (compute hours)", "Twilio (per message)", "OpenAI (per token)", "Vercel (per function invocation)"],
45
+ "metrics": ["usage growth rate", "bill predictability score", "usage per customer", "revenue per unit consumed"]
46
+ },
47
+ {
48
+ "name": "Anchor pricing (decoy effect)",
49
+ "description": "Introduce a premium option that makes the target option look like a better value by comparison. The premium option isn't expected to sell — it's an anchor.",
50
+ "when_to_use": "When you want to steer users toward a specific plan. Most effective with 3-plan pricing pages.",
51
+ "pitfalls": ["Anchor too expensive — feels unrealistic and breaks trust", "Anchor too close to target — no contrast", "Anchor doesn't have enough differentiating features", "Using this technique unethically or in regulated markets"],
52
+ "examples": ["The Economist subscription study (print+digital anchor)", "SaaS pricing with enterprise tier 4x the pro tier"],
53
+ "metrics": ["plan distribution shift", "mid-tier selection rate", "overall conversion rate"]
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "onboarding",
3
+ "name": "Onboarding Strategies",
4
+ "category": "business",
5
+ "summary": "Time-to-value optimization, activation metrics, and aha moment strategies for new user onboarding.",
6
+ "strategies": [
7
+ {
8
+ "name": "Time-to-value optimization",
9
+ "description": "The faster a user experiences the product's core value, the more likely they are to activate and retain. Every second between signup and 'aha' is friction. Measure time-to-value and systematically reduce it.",
10
+ "when_to_use": "Every product. This is the single most important onboarding metric.",
11
+ "pitfalls": ["Confusing setup with value — configuration isn't the aha moment", "Front-loading all features instead of the one that matters", "Measuring time-to-first-action instead of time-to-value-realized", "Ignoring time-to-value for different user segments (admin vs user)"],
12
+ "examples": ["Canva: first design in under 2 minutes with templates", "Slack: first team message within 5 minutes of workspace creation", "Figma: collaborative editing demo before any setup"],
13
+ "metrics": ["time-to-value (minutes from signup to core action)", "activation rate (% who reach aha moment)", "Day 1 retention", "onboarding completion rate"]
14
+ },
15
+ {
16
+ "name": "Aha moment identification",
17
+ "description": "The specific action or experience that makes the product's value click for the user. Identify it through data (what do retained users have in common?) and optimize the path to reach it.",
18
+ "when_to_use": "Products with clear 'aha' moments that correlate with retention. Use data analysis to identify the action that predicts long-term usage.",
19
+ "pitfalls": ["Assuming you know the aha moment without data validation", "Multiple aha moments for different segments — don't force one path", "Aha moment requires too many prerequisites", "Confusing feature engagement with genuine value realization"],
20
+ "examples": ["Facebook: '7 friends in 10 days' — social graph density predicted retention", "Dropbox: first file sync — experiencing the magic", "Slack: '2,000 messages sent by the team' — team communication habit formed"],
21
+ "metrics": ["aha moment reach rate", "correlation between aha action and D30 retention", "time-to-aha", "aha moment drop-off points"]
22
+ },
23
+ {
24
+ "name": "Progressive onboarding",
25
+ "description": "Reveal features gradually as users need them, rather than showing everything upfront. Use contextual tips, tooltips, and coach marks at the moment of relevance.",
26
+ "when_to_use": "Complex products with many features. Products where new users only need 20% of features initially.",
27
+ "pitfalls": ["Showing too many tooltips at once (tooltip fatigue)", "Onboarding that blocks the UI until dismissed", "Tips that appear at irrelevant times", "No way to replay or find onboarding tips later"],
28
+ "examples": ["Notion: empty page with '/' command hint — teaches as you create", "Linear: contextual keyboard shortcut hints during normal use", "Figma: feature tips on first use of each tool"],
29
+ "metrics": ["feature discovery rate", "onboarding tip engagement", "tip-to-feature-use conversion", "time-to-feature-discovery"]
30
+ },
31
+ {
32
+ "name": "Checklist onboarding",
33
+ "description": "A visible checklist of setup tasks that leverages the Goal-Gradient Effect and Zeigarnik Effect. Start with some items pre-completed to show momentum.",
34
+ "when_to_use": "Products requiring multiple setup steps. B2B products with team/workspace configuration.",
35
+ "pitfalls": ["Too many items on the checklist (5-7 max)", "Including non-essential items that delay value", "No clear benefit explanation for each item", "Checklist that can't be dismissed or deferred"],
36
+ "examples": ["Notion: workspace setup checklist with progress bar", "Intercom: getting started guide with percentage completion", "HubSpot: setup wizard with clear step descriptions"],
37
+ "metrics": ["checklist completion rate", "items-completed distribution", "correlation of completion with activation", "time-to-checklist-completion"]
38
+ },
39
+ {
40
+ "name": "Template/quickstart approach",
41
+ "description": "Offer pre-built templates, example data, or quickstart projects that give users a running start. Instead of blank canvas, start with something meaningful they can customize.",
42
+ "when_to_use": "Products where starting from blank is intimidating. Creative tools, project management, databases, and documentation products.",
43
+ "pitfalls": ["Templates that are too generic to be useful", "No clear path from template to customization", "Template library that's overwhelming (too many choices)", "Templates that don't represent real use cases"],
44
+ "examples": ["Notion: page templates for every use case", "Canva: design templates as the primary creation path", "Airtable: base templates for common workflows", "Linear: project templates with pre-configured workflows"],
45
+ "metrics": ["template usage rate", "template-to-custom creation ratio", "time-to-first-edit from template", "retention: template starters vs blank starters"]
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "retention",
3
+ "name": "Retention Strategies",
4
+ "category": "business",
5
+ "summary": "Engagement loops, habit formation, and churn prevention patterns that keep users coming back.",
6
+ "strategies": [
7
+ {
8
+ "name": "Hook model (Trigger → Action → Variable Reward → Investment)",
9
+ "description": "Nir Eyal's framework for building habit-forming products. External triggers (notifications, emails) drive initial actions. Variable rewards keep users engaged. Investments (data, customization, social connections) increase switching costs.",
10
+ "when_to_use": "Consumer products aiming for daily/weekly usage. Products that benefit from habitual use.",
11
+ "pitfalls": ["Manipulative if rewards exploit vulnerabilities", "External triggers become annoying if over-used", "Investment phase can feel like work if not tied to clear value", "Habit loops without genuine value create resentment"],
12
+ "examples": ["Instagram (trigger: notification → action: open → reward: new content → invest: post)", "Duolingo (trigger: streak reminder → action: lesson → reward: XP → invest: streak)"],
13
+ "metrics": ["DAU/MAU ratio (target: >20% for consumer, >40% for productivity)", "time-to-habit (how long until daily usage)", "session frequency", "notification-to-open rate"]
14
+ },
15
+ {
16
+ "name": "Streaks and progress systems",
17
+ "description": "Visual representations of consecutive usage that leverage loss aversion (Zeigarnik Effect). Users are motivated to maintain their streak and feel loss if it breaks.",
18
+ "when_to_use": "Products where consistent daily/weekly usage drives value. Learning, fitness, language, and productivity apps.",
19
+ "pitfalls": ["Broken streaks causing permanent disengagement", "Streaks feeling like a chore rather than achievement", "No streak recovery mechanism (freeze, bonus)", "Streaks not tied to meaningful progress"],
20
+ "examples": ["Duolingo (daily streak with freeze protection)", "GitHub (contribution graph)", "Snapchat (streak counter with friends)"],
21
+ "metrics": ["average streak length", "streak break recovery rate", "DAU impact of streak feature", "churn correlation with streak breaks"]
22
+ },
23
+ {
24
+ "name": "Re-engagement campaigns",
25
+ "description": "Email, push, and in-app campaigns targeted at users showing declining engagement. Win-back flows before they churn.",
26
+ "when_to_use": "When you can detect declining engagement patterns. Products with email/push notification permission.",
27
+ "pitfalls": ["Too frequent — becomes spam and accelerates churn", "Generic messaging — not personalized to the user's context", "Offering discounts too early — trains users to disengage for deals", "No segmentation — treating all at-risk users the same"],
28
+ "examples": ["'We miss you' emails with product updates", "Win-back offers after 30 days inactive", "Feature announcement targeting dormant users", "Personal onboarding call offers for high-value at-risk accounts"],
29
+ "metrics": ["reactivation rate", "win-back campaign ROI", "time-to-reactivation", "churn rate reduction from campaigns"]
30
+ },
31
+ {
32
+ "name": "Community and social features",
33
+ "description": "Features that create social bonds within the product — shared workspaces, commenting, mentions, and community spaces. Social connections are the strongest retention lever.",
34
+ "when_to_use": "Products where collaboration or social interaction adds value. When users benefit from seeing others' activity.",
35
+ "pitfalls": ["Building social features nobody uses (ghost town effect)", "Privacy concerns with activity visibility", "Moderation costs for user-generated content", "Social features that distract from core product value"],
36
+ "examples": ["Figma (collaborative editing, comments)", "Notion (shared workspaces)", "Strava (activity feed, challenges)", "Discord (community servers)"],
37
+ "metrics": ["connected users per account", "collaboration frequency", "social feature usage rate", "retention delta: social users vs solo users"]
38
+ },
39
+ {
40
+ "name": "Switching cost accumulation",
41
+ "description": "Product design that naturally increases the cost of switching over time — through data accumulation, integrations, customizations, and learned proficiency.",
42
+ "when_to_use": "B2B products and platforms where long-term retention matters. Products with significant setup investment.",
43
+ "pitfalls": ["Intentionally making data export difficult (hostile lock-in)", "Switching costs without corresponding value (feels like a trap)", "Over-reliance on switching costs instead of product quality", "Violating data portability regulations"],
44
+ "examples": ["Salesforce (CRM data + workflows + integrations)", "Slack (message history + integrations + channel structure)", "Notion (team knowledge base accumulation)"],
45
+ "metrics": ["data volume per account", "integration count", "customization depth", "churn correlation with investment level"]
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "id": "cta",
3
+ "name": "CTA Design",
4
+ "category": "conversion",
5
+ "summary": "Patterns for calls-to-action that drive the desired user behavior through clear hierarchy, placement, and copy.",
6
+ "principles_referenced": ["fitts-law", "von-restorff-effect", "hicks-law", "serial-position-effect", "color-60-30-10"],
7
+ "patterns": [
8
+ {
9
+ "name": "Button hierarchy",
10
+ "description": "Every page should have a clear CTA hierarchy: one primary action, optional secondary, and tertiary actions. Visual weight communicates importance.",
11
+ "do": ["One primary CTA per viewport — filled, high-contrast, prominent", "Secondary actions as outlined or ghost buttons", "Tertiary actions as text links or icon buttons", "Size primary button larger than secondary (min 16px height difference)", "Use brand accent color only for primary CTAs"],
12
+ "dont": ["Two buttons competing for primary attention", "Ghost/outlined button for the most important action", "All buttons the same visual weight", "Primary button in a color that blends with the background", "More than 3 action levels on one screen"],
13
+ "evidence": "Pages with clear single-primary CTA convert 20% higher than those with multiple competing CTAs. Button size correlates with click rate up to 44px height."
14
+ },
15
+ {
16
+ "name": "Action-oriented copy",
17
+ "description": "CTA button text should describe the outcome, not the mechanism. Use verbs that tell users what they'll get, not what they'll do.",
18
+ "do": ["'Start free trial' (outcome) vs 'Submit' (mechanism)", "'Get started' vs 'Sign up'", "'Save 20% annually' vs 'Choose annual'", "'Create your first project' vs 'Continue'", "Include value in the CTA ('Get 14-day free trial' vs 'Start trial')"],
19
+ "dont": ["Generic: 'Submit', 'OK', 'Click here', 'Continue'", "Vague: 'Learn more' (learn what?)", "Scary: 'Buy now' on a freemium product", "Wordy: more than 5 words on a button", "Passive: 'Your account will be created' vs 'Create account'"],
20
+ "evidence": "Action-oriented CTA text increases click-through by 25-35%. Including a benefit in the CTA text ('Get your free report') outperforms generic text by 40%."
21
+ },
22
+ {
23
+ "name": "CTA placement patterns",
24
+ "description": "Where you place the CTA dramatically affects conversion. Above-fold, at decision points, and at the end of content sections are the highest-performing positions.",
25
+ "do": ["Primary CTA above the fold on landing pages", "CTA at the end of every persuasive content section", "Sticky CTA on mobile (bottom of screen) for long pages", "Repeat the CTA at natural decision points throughout the page", "Place CTA adjacent to social proof and trust signals"],
26
+ "dont": ["Hide the CTA below multiple scrolls of content", "Put the CTA only at the bottom of a very long page", "Place CTA in the navigation (easy to miss)", "Float CTA over content it obscures", "Show CTA before the value proposition is understood"],
27
+ "evidence": "CTAs above the fold receive 80% more attention. Sticky mobile CTAs increase conversion by 10-15%. Repeating CTAs on long pages increases total clicks by 20%."
28
+ },
29
+ {
30
+ "name": "Urgency and scarcity signals",
31
+ "description": "Ethical use of time and availability signals to encourage action. Must be truthful — fake urgency destroys trust.",
32
+ "do": ["Show real limited-time offers with countdown timers", "Display actual stock/seat/spot counts when genuinely limited", "Show social proof of recent sign-ups ('12 people signed up today')", "Use 'limited beta' truthfully during actual beta phases", "Show the benefit of acting now vs later"],
33
+ "dont": ["Fake countdown timers that reset on page load (dark pattern)", "Artificial scarcity ('Only 2 left!') that's not real", "Pressure language ('Don't miss out!', 'Last chance!')", "Moving deadlines that erode trust", "Using urgency on non-time-sensitive products"],
34
+ "evidence": "Genuine scarcity signals increase conversion by 5-15%. Fake urgency increases conversion short-term but reduces trust and LTV. EU/US regulators increasingly penalize dark patterns."
35
+ }
36
+ ],
37
+ "checklist": [
38
+ "Is there one clear primary CTA per viewport?",
39
+ "Does the CTA button text describe the outcome (not 'Submit')?",
40
+ "Is the primary CTA above the fold?",
41
+ "Is the CTA visually distinct from surrounding elements?",
42
+ "Does the CTA use the brand accent color?",
43
+ "Is there a clear visual hierarchy between primary, secondary, and tertiary actions?",
44
+ "Is the CTA button large enough (min 44px height, min 120px width)?",
45
+ "Is the CTA repeated at natural decision points on long pages?",
46
+ "Is there a mobile sticky CTA for long scrolling pages?",
47
+ "Is any urgency/scarcity messaging truthful?",
48
+ "Is the CTA accessible (sufficient contrast, keyboard focusable)?",
49
+ "Is there supporting text near the CTA ('No credit card required', 'Free for 14 days')?"
50
+ ]
51
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "id": "dashboard",
3
+ "name": "Dashboard Design",
4
+ "category": "usability",
5
+ "summary": "Patterns for dashboards that surface the right data at the right time without overwhelming users.",
6
+ "principles_referenced": ["aesthetic-minimalist-design", "recognition-over-recall", "millers-law", "pareto-principle", "hicks-law"],
7
+ "patterns": [
8
+ {
9
+ "name": "KPI cards at the top",
10
+ "description": "The top of the dashboard shows 3-5 key metrics as large, scannable cards. These are the numbers the user checks every day — their 'north star' data.",
11
+ "do": ["Show 3-5 key metrics as prominent cards/tiles", "Include trend indicators (up/down arrows, sparklines)", "Show comparison to previous period (vs last week, vs target)", "Use semantic color for positive/negative trends", "Make cards clickable for drill-down"],
12
+ "dont": ["Show more than 6 KPI cards — prioritize", "Use equal visual weight for all metrics", "Show raw numbers without context (1,234 what?)", "Include metrics that don't drive action"],
13
+ "evidence": "Users spend 80% of dashboard time on 20% of data (Pareto). Dashboards with 3-5 KPIs have 40% higher engagement than those with 10+."
14
+ },
15
+ {
16
+ "name": "Activity feed / recent items",
17
+ "description": "A chronological feed of recent events, changes, or items. Provides a 'pulse' of what's happening. Can be the center or right panel of a dashboard.",
18
+ "do": ["Show the most recent items first", "Include timestamps (relative: '2 hours ago')", "Group by date for longer histories", "Show enough detail to act without clicking through", "Include avatar/icon for the actor or event type"],
19
+ "dont": ["Show a firehose of all events without filtering", "Use identical styling for different event types", "Require pagination for the recent 24 hours of activity", "Mix unrelated event types without visual distinction"],
20
+ "evidence": "Activity feeds increase daily active usage by 20-30% in SaaS products. They reduce the need to navigate to individual sections to check for updates."
21
+ },
22
+ {
23
+ "name": "Empty states",
24
+ "description": "What the dashboard shows when there's no data yet. The first experience a new user sees. Must guide them to take the first meaningful action.",
25
+ "do": ["Show a clear illustration or graphic (not just 'No data')", "Explain what will appear here and how to populate it", "Provide a primary CTA to take the first action", "Use encouraging, helpful language", "Consider showing sample/demo data with a clear label"],
26
+ "dont": ["Show a blank page or just 'No data found'", "Display error-styled empty states (red, warning icons)", "Show complex visualizations with zero values", "Leave the user to figure out what to do next"],
27
+ "evidence": "Well-designed empty states increase user activation by 30%. They're the single most impactful pattern for new user experience."
28
+ },
29
+ {
30
+ "name": "Data density management",
31
+ "description": "Balancing information density with clarity. Dense dashboards for experts (Bloomberg terminal), spacious dashboards for occasional users. Use progressive disclosure to serve both.",
32
+ "do": ["Default to a clean, focused view", "Allow users to customize which widgets/cards are visible", "Use expandable sections for detailed data", "Provide view toggles (summary vs detailed)", "Consider a 'focus mode' that shows only one metric with full detail"],
33
+ "dont": ["Show all available data at once — curate and prioritize", "Use tiny text to fit more data (accessibility failure)", "Ignore user role — admins and users need different views", "Make the dense view the default for all users"],
34
+ "evidence": "Customizable dashboards have 50% higher engagement than static ones. Default views should serve the most common use case."
35
+ }
36
+ ],
37
+ "checklist": [
38
+ "Are the top 3-5 KPIs immediately visible without scrolling?",
39
+ "Do metrics include trend indicators and comparison context?",
40
+ "Is there an empty state that guides new users to take action?",
41
+ "Can users customize their dashboard (show/hide widgets)?",
42
+ "Are data cards clickable for drill-down?",
43
+ "Is there a recent activity or updates section?",
44
+ "Is the dashboard responsive — does it work on tablet/mobile?",
45
+ "Is loading fast (<2 seconds) with skeleton screens for slower data?",
46
+ "Are error states handled gracefully when data fails to load?",
47
+ "Is the information density appropriate for the target user?",
48
+ "Are refresh intervals communicated ('Updated 5 minutes ago')?",
49
+ "Can the user take action directly from the dashboard (not just view data)?"
50
+ ]
51
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "id": "empty-states",
3
+ "name": "Empty States",
4
+ "category": "usability",
5
+ "summary": "Patterns for zero-data states that guide users to take their first action and understand what the feature does.",
6
+ "principles_referenced": ["visibility-of-system-status", "help-documentation", "peak-end-rule", "goal-gradient-effect"],
7
+ "patterns": [
8
+ {
9
+ "name": "First-use empty state",
10
+ "description": "What a new user sees when they first encounter a feature with no data. The most important empty state — it determines whether the user understands the feature and takes action.",
11
+ "do": ["Use an illustration or icon that represents the feature", "Explain what will appear here once they take action", "Provide a clear, prominent CTA to create the first item", "Use encouraging, friendly language ('Start by creating your first project')", "Consider showing a template or example to lower the barrier"],
12
+ "dont": ["Show a blank page or just 'No items'", "Use error styling for empty states", "Overwhelm with explanation — keep it to 1-2 sentences + CTA", "Show a loading state that resolves to empty (feels like an error)", "Block the rest of the UI — empty states should be scoped to the empty section"],
13
+ "evidence": "First-use empty states with CTAs increase feature activation by 30-50%. Illustration + copy + CTA is the most effective format."
14
+ },
15
+ {
16
+ "name": "No-results empty state",
17
+ "description": "What appears when a search or filter returns no results. Must help the user recover — either by adjusting their query or discovering alternative content.",
18
+ "do": ["Clearly state that no results were found", "Show the user's search query so they can verify spelling", "Suggest actions: try different keywords, remove filters, browse categories", "Show popular or recent items as alternatives", "Provide a 'clear all filters' shortcut"],
19
+ "dont": ["Show a completely blank area — always provide guidance", "Blame the user ('No results for your bad query')", "Just say 'No results' with no recovery options", "Redirect away from the search page — let them adjust in place"],
20
+ "evidence": "No-results pages with suggestions reduce exit rates by 40%. Showing popular alternatives keeps users engaged when their search fails."
21
+ },
22
+ {
23
+ "name": "Cleared/completed empty state",
24
+ "description": "What appears when the user has processed all items (inbox zero, all tasks completed). A moment to celebrate and reinforce positive behavior.",
25
+ "do": ["Celebrate the achievement ('All caught up!', 'Inbox zero!')", "Use a positive illustration or animation", "Suggest next actions or related content", "Make it feel like an accomplishment, not a void"],
26
+ "dont": ["Show the same empty state as first-use (this is a different context)", "Make it feel like something is broken", "Immediately push the user to create more work", "Use generic 'No items' messaging — this is a win moment"],
27
+ "evidence": "Celebratory empty states increase user satisfaction and daily return rate by 15%. Gmail's 'Nothing in Promotions' sunshine illustration set the standard."
28
+ }
29
+ ],
30
+ "checklist": [
31
+ "Does every list/collection view have a designed empty state?",
32
+ "Do first-use empty states explain what will appear and how to populate it?",
33
+ "Is there a clear CTA on first-use empty states?",
34
+ "Do search/filter empty states help users recover?",
35
+ "Do completion empty states celebrate the user?",
36
+ "Are empty states visually distinct from error states?",
37
+ "Do empty states include helpful illustrations or icons?",
38
+ "Is the language encouraging and non-blaming?",
39
+ "Is the empty state scoped to the empty section (not the full page)?",
40
+ "Have you designed for all three types: first-use, no-results, completed?"
41
+ ]
42
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "id": "error-states",
3
+ "name": "Error States",
4
+ "category": "usability",
5
+ "summary": "Patterns for error pages, error messages, and recovery flows that help users understand and fix problems.",
6
+ "principles_referenced": ["help-recover-errors", "visibility-of-system-status", "user-control-freedom", "postels-law"],
7
+ "patterns": [
8
+ {
9
+ "name": "Inline field errors",
10
+ "description": "Error messages that appear directly below the form field that has the error. The most effective error display pattern for forms.",
11
+ "do": ["Position the error message directly below the field", "Use red/destructive color + an error icon + text (redundant coding)", "State what's wrong AND how to fix it ('Email must include @')", "Show on blur (when the user leaves the field)", "Keep the user's input so they can edit, not re-type"],
12
+ "dont": ["Show errors only at the top of the form (far from the problem)", "Use red text without an icon (fails for colorblind users)", "Say 'Invalid' without explaining what's valid", "Clear the field on error — the user's input is the starting point for fixing", "Show errors while the user is still typing (validate on blur)"],
13
+ "evidence": "Inline errors reduce form completion time by 42% and errors by 22% compared to top-of-form error summaries."
14
+ },
15
+ {
16
+ "name": "Error pages (404, 500)",
17
+ "description": "Full-page error states for broken links, server errors, and unavailable content. Must be helpful and provide clear recovery paths.",
18
+ "do": ["Use human-readable language ('Page not found', not '404 Error')", "Provide recovery options: go home, search, go back", "Include search if the site has it", "Use a consistent, branded design", "Log the error details for debugging without showing them to the user"],
19
+ "dont": ["Show raw technical error codes to end users", "Provide no recovery options — users leave instead", "Use humor that might frustrate an already annoyed user", "Show a completely different design from the rest of the site", "Auto-redirect away from the error page (let the user choose)"],
20
+ "evidence": "Custom error pages that include search reduce bounce rate by 35%. Recovery links increase the chance of the user staying on-site by 50%."
21
+ },
22
+ {
23
+ "name": "Connection/network error",
24
+ "description": "What to show when the user's internet connection is lost or the server is unreachable. Must clearly communicate the issue and provide a retry path.",
25
+ "do": ["Clearly state it's a connection issue, not a bug", "Provide a 'Retry' or 'Try again' button", "Show what was saved vs what might be lost", "Auto-retry in the background with exponential backoff", "Show offline indicator in the UI (banner or toast)"],
26
+ "dont": ["Show a generic 'Error' with no context", "Delete the user's unsaved work", "Auto-redirect to a different page", "Silently fail without notifying the user", "Show a technical timeout error message"],
27
+ "evidence": "Auto-retry with user notification reduces support tickets for network issues by 60%. Offline indicators set correct expectations and reduce frustration."
28
+ },
29
+ {
30
+ "name": "Partial failure (graceful degradation)",
31
+ "description": "When part of a page fails to load but the rest works. Show the working content with a focused error indicator on the failed section.",
32
+ "do": ["Show the parts of the page that work normally", "Show an error state only in the failed section", "Provide a retry option for just the failed section", "Log the error for debugging", "Use a consistent error card/placeholder style"],
33
+ "dont": ["Show a full-page error for a single failed widget", "Silently hide the failed section with no indication", "Retry infinitely without telling the user", "Block interaction with working sections while one section retries"],
34
+ "evidence": "Graceful degradation keeps users productive even during partial failures. Full-page errors for partial failures lose 80% of users; partial error states lose only 20%."
35
+ }
36
+ ],
37
+ "checklist": [
38
+ "Do all form fields have inline error messages below the field?",
39
+ "Do error messages explain what's wrong AND how to fix it?",
40
+ "Are error states accessible (color + icon + text, not just color)?",
41
+ "Is there a custom 404 page with recovery options?",
42
+ "Is there a custom 500/server error page?",
43
+ "Do network errors show a retry option?",
44
+ "Is partial failure handled gracefully (not full-page error)?",
45
+ "Are error messages written in human language (no error codes)?",
46
+ "Is user input preserved on error (not cleared)?",
47
+ "Are errors logged for debugging without showing technical details to users?",
48
+ "Is there an offline state/banner for network disconnection?",
49
+ "Do error pages match the site's design (not a generic server page)?"
50
+ ]
51
+ }