cbrowser 17.6.1 → 18.1.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 (37) hide show
  1. package/dist/browser.d.ts +4 -0
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +37 -1
  4. package/dist/browser.js.map +1 -1
  5. package/dist/cli.js +10 -5
  6. package/dist/cli.js.map +1 -1
  7. package/dist/mcp-server-remote.d.ts.map +1 -1
  8. package/dist/mcp-server-remote.js +3 -1
  9. package/dist/mcp-server-remote.js.map +1 -1
  10. package/dist/mcp-tools/base/navigation-tools.d.ts.map +1 -1
  11. package/dist/mcp-tools/base/navigation-tools.js +33 -12
  12. package/dist/mcp-tools/base/navigation-tools.js.map +1 -1
  13. package/dist/mcp-tools/index.d.ts +1 -0
  14. package/dist/mcp-tools/index.d.ts.map +1 -1
  15. package/dist/mcp-tools/index.js +2 -0
  16. package/dist/mcp-tools/index.js.map +1 -1
  17. package/dist/mcp-tools/screenshot-utils.d.ts +45 -0
  18. package/dist/mcp-tools/screenshot-utils.d.ts.map +1 -0
  19. package/dist/mcp-tools/screenshot-utils.js +131 -0
  20. package/dist/mcp-tools/screenshot-utils.js.map +1 -0
  21. package/docs/Tool-Cognitive-Journey-Autonomous.md +264 -0
  22. package/docs/Tool-Competitive-Benchmark.md +287 -0
  23. package/docs/Tool-Empathy-Audit.md +325 -0
  24. package/docs/Tool-Hunt-Bugs.md +299 -0
  25. package/docs/Tool-Marketing-Campaign.md +292 -0
  26. package/docs/Tool-Persona-Create.md +268 -0
  27. package/docs/Tools-Accessibility.md +202 -0
  28. package/docs/Tools-Browser-Automation.md +305 -0
  29. package/docs/Tools-Cognitive-Journeys.md +227 -0
  30. package/docs/Tools-Marketing-Intelligence.md +265 -0
  31. package/docs/Tools-Overview.md +143 -0
  32. package/docs/Tools-Persona-System.md +294 -0
  33. package/docs/Tools-Session-State.md +272 -0
  34. package/docs/Tools-Testing-Quality.md +251 -0
  35. package/docs/Tools-Utilities.md +176 -0
  36. package/docs/Tools-Visual-Performance.md +272 -0
  37. package/package.json +1 -1
@@ -0,0 +1,268 @@
1
+ # Creating Custom Personas
2
+
3
+ **Build personas that match your actual users, not generic archetypes.**
4
+
5
+ CBrowser's persona creation tools let you build custom cognitive profiles from scratch — either by answering a research-backed questionnaire or by describing the person in natural language. Your custom personas behave consistently across all cognitive journey and testing tools.
6
+
7
+ ---
8
+
9
+ ## Two Ways to Create Personas
10
+
11
+ ### 1. Description Mode (Fast)
12
+
13
+ Describe the persona in natural language, AI infers the traits.
14
+
15
+ ```json
16
+ // Step 1: Start creation
17
+ {
18
+ "tool": "persona_create_start",
19
+ "params": {
20
+ "mode": "description",
21
+ "name": "enterprise-cto"
22
+ }
23
+ }
24
+
25
+ // Step 2: Provide description
26
+ {
27
+ "tool": "persona_create_from_description",
28
+ "params": {
29
+ "sessionId": "create_abc123",
30
+ "description": "CTO at a Fortune 500 company. Extremely time-constrained, delegates evaluation to team. Only looks at executive summaries and security certifications. Skeptical of vendors, needs proof of enterprise customers. Won't read more than 2 paragraphs."
31
+ }
32
+ }
33
+
34
+ // Step 3: Review and submit
35
+ {
36
+ "tool": "persona_create_submit_traits",
37
+ "params": {
38
+ "sessionId": "create_abc123",
39
+ "traits": { /* reviewed/adjusted traits */ },
40
+ "save": true
41
+ }
42
+ }
43
+ ```
44
+
45
+ ---
46
+
47
+ ### 2. Questionnaire Mode (Precise)
48
+
49
+ Answer research-backed questions to set exact trait values.
50
+
51
+ ```json
52
+ // Step 1: Start creation
53
+ {
54
+ "tool": "persona_create_start",
55
+ "params": {
56
+ "mode": "questionnaire",
57
+ "name": "cautious-buyer"
58
+ }
59
+ }
60
+
61
+ // Step 2: Start questionnaire
62
+ {
63
+ "tool": "persona_create_questionnaire_start",
64
+ "params": {
65
+ "sessionId": "create_abc123",
66
+ "comprehensive": false // 8 core traits
67
+ }
68
+ }
69
+
70
+ // Step 3: Answer each question
71
+ {
72
+ "tool": "persona_create_questionnaire_answer",
73
+ "params": {
74
+ "sessionId": "create_abc123",
75
+ "answer": 2 // e.g., "Somewhat patient"
76
+ }
77
+ }
78
+ // Repeat for each question...
79
+ ```
80
+
81
+ ---
82
+
83
+ ## The 25 Cognitive Traits
84
+
85
+ Custom personas are built from 25 research-validated traits:
86
+
87
+ ### Tier 1: Core (7 traits)
88
+
89
+ | Trait | Low Value | High Value |
90
+ |-------|-----------|------------|
91
+ | **Patience** | Abandons quickly on any delay | Waits indefinitely |
92
+ | **Risk Tolerance** | Only clicks familiar things | Clicks anything |
93
+ | **Comprehension** | Misreads icons, confused by layout | Gets it instantly |
94
+ | **Persistence** | Gives up after first failure | Keeps trying forever |
95
+ | **Curiosity** | Direct path only | Explores everything |
96
+ | **Working Memory** | Forgets what they tried | Perfect recall |
97
+ | **Reading Tendency** | Scans for buttons | Reads every word |
98
+
99
+ ### Tier 2: Emotional (4 traits)
100
+
101
+ | Trait | Low Value | High Value |
102
+ |-------|-----------|------------|
103
+ | **Resilience** | Derailed by any setback | Bounces back instantly |
104
+ | **Self-Efficacy** | "I can't figure this out" | "I can do anything" |
105
+ | **Trust Calibration** | Trusts nothing | Trusts everything |
106
+ | **Interrupt Recovery** | Loses all context | Picks up seamlessly |
107
+
108
+ ### Tier 3: Decision-Making (5 traits)
109
+
110
+ | Trait | Low Value | High Value |
111
+ |-------|-----------|------------|
112
+ | **Satisficing** | First option works | Must find the best |
113
+ | **Information Foraging** | Takes what's offered | Hunts for more |
114
+ | **Anchoring Bias** | First price is the price | Compares extensively |
115
+ | **Time Horizon** | Only immediate benefits | Plans for future |
116
+ | **Attribution Style** | "It's my fault" | "It's their fault" |
117
+
118
+ ### Tier 4: Planning (3 traits)
119
+
120
+ | Trait | Low Value | High Value |
121
+ |-------|-----------|------------|
122
+ | **Metacognitive Planning** | Dives in without plan | Plans every step |
123
+ | **Procedural Fluency** | Struggles with forms | Handles any workflow |
124
+ | **Transfer Learning** | Every site is new | Applies past experience |
125
+
126
+ ### Tier 5: Perception (2 traits)
127
+
128
+ | Trait | Low Value | High Value |
129
+ |-------|-----------|------------|
130
+ | **Change Blindness** | Misses all changes | Notices everything |
131
+ | **Mental Model Rigidity** | Expects exact patterns | Adapts to variations |
132
+
133
+ ### Tier 6: Social (4 traits)
134
+
135
+ | Trait | Low Value | High Value |
136
+ |-------|-----------|------------|
137
+ | **Authority Sensitivity** | Ignores credentials | Persuaded by authority |
138
+ | **Emotional Contagion** | Unaffected by tone | Mirrors page emotion |
139
+ | **FOMO** | Immune to urgency | Panics at countdown |
140
+ | **Social Proof Sensitivity** | Ignores reviews | Heavily influenced |
141
+
142
+ ---
143
+
144
+ ## Example: Creating "Skeptical Enterprise Buyer"
145
+
146
+ ### Using Description Mode
147
+
148
+ ```json
149
+ {
150
+ "description": "IT procurement manager at a healthcare company. Extremely risk-averse due to compliance requirements. Needs to see HIPAA certification, SOC 2 reports, and existing healthcare customers. Won't proceed without these. Takes notes on everything. Will read the fine print. Doesn't trust marketing language - wants technical docs."
151
+ }
152
+ ```
153
+
154
+ **Inferred traits:**
155
+ - `riskTolerance`: 0.15 (very low)
156
+ - `trustCalibration`: 0.25 (skeptical)
157
+ - `readingTendency`: 0.85 (reads everything)
158
+ - `authoritySensitivity`: 0.80 (needs credentials)
159
+ - `socialProofSensitivity`: 0.70 (wants customer references)
160
+ - `patience`: 0.70 (thorough but not slow)
161
+ - `proceduralFluency`: 0.65 (handles enterprise forms)
162
+
163
+ ---
164
+
165
+ ### Using Questionnaire Mode
166
+
167
+ **Q1: When a website takes longer than expected to load, this person typically:**
168
+ - (1) Leaves immediately
169
+ - (2) Waits a few seconds then leaves
170
+ - (3) Waits patiently for about 10 seconds
171
+ - (4) Waits as long as it takes
172
+ → Answer: 3 (patience = 0.6)
173
+
174
+ **Q2: When encountering an unfamiliar button or feature, this person:**
175
+ - (1) Never clicks anything unfamiliar
176
+ - (2) Rarely clicks unfamiliar elements
177
+ - (3) Sometimes explores new features
178
+ - (4) Clicks on everything to see what happens
179
+ → Answer: 2 (riskTolerance = 0.25)
180
+
181
+ *Continue for all 8 core traits...*
182
+
183
+ ---
184
+
185
+ ## Using Custom Personas
186
+
187
+ Once created, use your persona anywhere:
188
+
189
+ ```json
190
+ // In cognitive journeys
191
+ {
192
+ "tool": "cognitive_journey_init",
193
+ "params": {
194
+ "persona": "skeptical-enterprise-buyer",
195
+ "startUrl": "https://example.com/enterprise",
196
+ "goal": "Request a demo"
197
+ }
198
+ }
199
+
200
+ // In persona comparisons
201
+ {
202
+ "tool": "compare_personas",
203
+ "params": {
204
+ "personas": ["skeptical-enterprise-buyer", "startup-founder", "first-timer"],
205
+ "startUrl": "https://example.com/pricing",
206
+ "goal": "Understand pricing"
207
+ }
208
+ }
209
+
210
+ // In empathy audits
211
+ {
212
+ "tool": "empathy_audit",
213
+ "params": {
214
+ "personas": ["skeptical-enterprise-buyer"],
215
+ "task": "Find security documentation"
216
+ }
217
+ }
218
+ ```
219
+
220
+ ---
221
+
222
+ ## Best Practices
223
+
224
+ ### Be Specific
225
+
226
+ **Good**: "Financial advisor at a regional bank. 50s, uses technology but not an early adopter. Concerned about data security. Needs to justify purchases to compliance department."
227
+
228
+ **Bad**: "Business professional"
229
+
230
+ ### Include Motivations
231
+
232
+ What does this person *want*? What are they *afraid of*? These inform trait values.
233
+
234
+ ### Include Context
235
+
236
+ Job title, industry, company size, tech comfort level all help inference.
237
+
238
+ ### Test and Iterate
239
+
240
+ Run a few journeys, see if the behavior matches expectations, adjust traits if needed.
241
+
242
+ ---
243
+
244
+ ## Trait Correlations
245
+
246
+ CBrowser applies research-based trait correlations automatically:
247
+
248
+ | If You Set... | These Also Adjust |
249
+ |---------------|-------------------|
250
+ | Low patience | ↓ Resilience, ↑ Satisficing |
251
+ | Low risk tolerance | ↓ Curiosity, ↑ Social proof need |
252
+ | Low comprehension | ↑ Reading tendency (compensating) |
253
+ | High FOMO | ↓ Time horizon |
254
+
255
+ This creates more realistic, internally consistent personas.
256
+
257
+ ---
258
+
259
+ ## Related Documentation
260
+
261
+ - [Persona Index](/docs/Persona-Index/) — Built-in personas
262
+ - [Trait Index](/docs/Trait-Index/) — Deep dives on each trait
263
+ - [Persona Questionnaire](/docs/Persona-Questionnaire/) — Full questionnaire reference
264
+ - [Values Framework](/docs/Values-Framework/) — Schwartz values and motivations
265
+
266
+ ---
267
+
268
+ *Last updated: v17.6.0*
@@ -0,0 +1,202 @@
1
+ # Accessibility Tools
2
+
3
+ **Experience your site through the eyes of someone who can't use a mouse.**
4
+
5
+ The `empathy_audit` tool simulates how people with disabilities actually experience your site — motor tremors that make clicking hard, low vision that requires zoom, ADHD that makes long forms impossible. This isn't a WCAG checklist. It's lived experience simulation.
6
+
7
+ ---
8
+
9
+ ## When to Use This Tool
10
+
11
+ - **You think your site is accessible** but you've only run automated checkers
12
+ - **You need to prioritize fixes** and want to know what actually impacts real users
13
+ - **You're building for an aging population** and need to understand their struggles
14
+ - **Compliance audits are coming** and you need to find issues before auditors do
15
+
16
+ ---
17
+
18
+ ## The Tool
19
+
20
+ ### `empathy_audit`
21
+
22
+ **What it does**: Simulate disability personas navigating your site, detecting WCAG violations with the context of how they actually impact users.
23
+
24
+ **Why you'd use it**: Automated accessibility checkers find violations. This tool shows you which violations actually matter and what the experience feels like.
25
+
26
+ | Parameter | Type | Required | Description |
27
+ |-----------|------|----------|-------------|
28
+ | `url` | string | Yes | URL to audit |
29
+ | `personas` | array | No | Disability personas to simulate. Default: all |
30
+ | `task` | string | No | Specific task to attempt (e.g., "complete checkout") |
31
+ | `wcagLevel` | string | No | WCAG level: `A`, `AA`, `AAA`. Default: `AA` |
32
+
33
+ **Example**:
34
+ ```json
35
+ {
36
+ "url": "https://example.com/signup",
37
+ "personas": ["motor-tremor", "low-vision", "cognitive-adhd"],
38
+ "task": "Create an account"
39
+ }
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Disability Personas
45
+
46
+ ### `motor-tremor`
47
+
48
+ **Simulates**: Essential tremor, Parkinson's disease, or any condition affecting fine motor control.
49
+
50
+ **Behavioral Impact**:
51
+ - Struggles with small click targets (< 44px)
52
+ - Can't hover reliably for dropdown menus
53
+ - Needs keyboard navigation
54
+ - Frustrated by time-limited interactions
55
+
56
+ **WCAG Focus**: Target size (2.5.5), Keyboard accessible (2.1.1), No timing (2.2.3)
57
+
58
+ ---
59
+
60
+ ### `low-vision`
61
+
62
+ **Simulates**: Partial sight, macular degeneration, or conditions requiring magnification.
63
+
64
+ **Behavioral Impact**:
65
+ - Uses 200%+ zoom
66
+ - Loses context when zoomed in
67
+ - Needs high contrast
68
+ - Can't see small text or icons without labels
69
+
70
+ **WCAG Focus**: Reflow (1.4.10), Contrast (1.4.3), Text spacing (1.4.12)
71
+
72
+ ---
73
+
74
+ ### `cognitive-adhd`
75
+
76
+ **Simulates**: ADHD, attention difficulties, executive function challenges.
77
+
78
+ **Behavioral Impact**:
79
+ - Skims rapidly, misses key information
80
+ - Abandons long forms
81
+ - Distracted by animations/movement
82
+ - Needs clear visual hierarchy
83
+
84
+ **WCAG Focus**: Pause/stop (2.2.2), Error prevention (3.3.4), Consistent navigation (3.2.3)
85
+
86
+ ---
87
+
88
+ ### `dyslexia`
89
+
90
+ **Simulates**: Reading difficulties, letter/word recognition challenges.
91
+
92
+ **Behavioral Impact**:
93
+ - Struggles with dense text blocks
94
+ - Needs clear typography and spacing
95
+ - Misreads similar words
96
+ - Benefits from icons alongside text
97
+
98
+ **WCAG Focus**: Reading level (3.1.5), Line height (1.4.12), Clear fonts
99
+
100
+ ---
101
+
102
+ ### `deaf`
103
+
104
+ **Simulates**: Deaf or hard of hearing users.
105
+
106
+ **Behavioral Impact**:
107
+ - Can't access audio content without captions
108
+ - Misses audio alerts/notifications
109
+ - Relies entirely on visual information
110
+ - Needs sign language or text alternatives
111
+
112
+ **WCAG Focus**: Captions (1.2.2), Audio description (1.2.5), Visual alternatives (1.4.1)
113
+
114
+ ---
115
+
116
+ ### `color-blind`
117
+
118
+ **Simulates**: Color vision deficiency (protanopia, deuteranopia, tritanopia).
119
+
120
+ **Behavioral Impact**:
121
+ - Can't distinguish red/green, blue/yellow
122
+ - Misses color-coded information
123
+ - Needs patterns/labels in addition to color
124
+ - Confused by red/green status indicators
125
+
126
+ **WCAG Focus**: Use of color (1.4.1), Contrast (1.4.3)
127
+
128
+ ---
129
+
130
+ ## What the Audit Returns
131
+
132
+ ```json
133
+ {
134
+ "persona": "motor-tremor",
135
+ "taskSuccess": false,
136
+ "abandonmentPoint": "Payment form - credit card expiry dropdown",
137
+ "timeToAbandon": 142,
138
+ "barriers": [
139
+ {
140
+ "type": "small-target",
141
+ "element": "#expiry-month",
142
+ "wcag": "2.5.5",
143
+ "severity": "critical",
144
+ "userImpact": "Cannot reliably click the 32px dropdown with tremor",
145
+ "remediation": "Increase target size to 44px minimum or provide keyboard alternative"
146
+ },
147
+ {
148
+ "type": "hover-dependent",
149
+ "element": ".nav-dropdown",
150
+ "wcag": "2.1.1",
151
+ "severity": "serious",
152
+ "userImpact": "Dropdown closes before user can move cursor into it",
153
+ "remediation": "Add click-to-open or increase hover delay"
154
+ }
155
+ ],
156
+ "wcagViolations": 7,
157
+ "recommendations": [
158
+ "Add keyboard navigation to all dropdowns",
159
+ "Increase minimum touch target to 44px",
160
+ "Add skip-to-content link"
161
+ ]
162
+ }
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Why This Is Different From WCAG Checkers
168
+
169
+ | Traditional Checker | Empathy Audit |
170
+ |--------------------|---------------|
171
+ | "Image missing alt text" | "Blind user couldn't understand the product because the hero image has no description" |
172
+ | "Target size 32px" | "User with tremor couldn't click the dropdown after 8 attempts" |
173
+ | "Contrast ratio 3.8:1" | "Low vision user at 200% zoom couldn't read the error message" |
174
+ | Reports violations | Reports **impact** |
175
+ | Pass/fail metrics | Abandonment stories |
176
+
177
+ ---
178
+
179
+ ## Running Empathy Audits in CI/CD
180
+
181
+ ```bash
182
+ # Quick audit before deploy
183
+ npx cbrowser empathy-audit https://staging.example.com --personas motor-tremor,low-vision
184
+
185
+ # Full audit with task
186
+ npx cbrowser empathy-audit https://staging.example.com \
187
+ --task "Complete checkout" \
188
+ --wcag AA \
189
+ --output report.html
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Related Documentation
195
+
196
+ - [Persona Index](/docs/Persona-Index/) — All personas including accessibility
197
+ - [UX Analysis Suite](/docs/UX-Analysis-Suite/) — Full UX analysis capabilities
198
+ - [Constitutional Safety](/docs/Constitutional-Safety/) — How CBrowser handles sensitive operations
199
+
200
+ ---
201
+
202
+ *Last updated: v17.6.0*