mackenzietechdocs DevRubenArevalo commited on
Commit
c6a01e9
·
verified ·
1 Parent(s): f8e47ff

project-init-alpha (#2)

Browse files

- MCP init - TeamHealix (ad4bf7c00a8767cf7467b278f22c2b1b8391ee75)
- ignore huggingface token (f9a4e236cfcc493ae7616afe5e8f977074cbed78)
- Merge branch 'project-init-alpha' into pr/2 (6fa7b4f3ecff574eb861947c6102997d454b2068)
- Readme.md udpate (e249ffb27d56a9460053cfb74d3230a4c85fd002)


Co-authored-by: Ruben Arevalo <DevRubenArevalo@users.noreply.huggingface.co>

.env.example ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ANTHROPIC_API_KEY=your_api_key_here
2
+ # Optional: override the default Claude model (claude-3-5-sonnet-20241022)
3
+ # ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
.gitignore CHANGED
@@ -1,4 +1,35 @@
1
- venv
2
- dist
3
- node_modules
4
- .env
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ node_modules/
2
+ dist/
3
+ *.pyc
4
+ __pycache__/
5
+ .env
6
+ .env.local
7
+ .env.*.local
8
+ .DS_Store
9
+ *.log
10
+ npm-debug.log*
11
+ yarn-debug.log*
12
+ yarn-error.log*
13
+ .vscode/
14
+ .idea/
15
+ *.swp
16
+ *.swo
17
+ *~
18
+ .cache/
19
+ .pytest_cache/
20
+ build/
21
+ *.egg-info/
22
+ .Python
23
+ pip-log.txt
24
+ pip-delete-this-directory.txt
25
+ .tox/
26
+ .coverage
27
+ .coverage.*
28
+ .cache
29
+ nosetests.xml
30
+ coverage.xml
31
+ *.cover
32
+ .hypothesis/
33
+ *.db
34
+ venv/
35
+ .huggingface/
DEPLOYMENT.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HealixPath Deployment Guide
2
+
3
+ ## Hugging Face Spaces Deployment
4
+
5
+ ### Prerequisites
6
+ - Hugging Face account
7
+ - Git installed locally
8
+ - Node.js 18+ and npm
9
+ - Python 3.10+
10
+
11
+ ### Step 1: Create a Hugging Face Space
12
+
13
+ 1. Go to [huggingface.co/new-space](https://huggingface.co/new-space)
14
+ 2. Fill in the details:
15
+ - **Space name**: `healixpath`
16
+ - **License**: MIT
17
+ - **Space SDK**: Docker (recommended for better control)
18
+
19
+ ### Step 2: Clone Your Space Repository
20
+
21
+ ```bash
22
+ git clone https://huggingface.co/spaces/<your-username>/healixpath
23
+ cd healixpath
24
+ ```
25
+
26
+ ### Step 3: Copy Project Files
27
+
28
+ Copy all files from this repository to your Space repository:
29
+
30
+ ```bash
31
+ # From your local HealixPath directory
32
+ cp -r src/ package.json tsconfig.json data/ app.py requirements.txt .gitignore README.md /path/to/space/healixpath/
33
+ ```
34
+
35
+ ### Step 4: Build and Test Locally
36
+
37
+ #### Test Node.js MCP Server
38
+
39
+ ```bash
40
+ npm install
41
+ npm run build
42
+ npm run start
43
+ ```
44
+
45
+ #### Test Gradio App
46
+
47
+ ```bash
48
+ pip install -r requirements.txt
49
+ python app.py
50
+ ```
51
+
52
+ The app will be available at `http://localhost:7860`
53
+
54
+ ### Step 5: Deploy to Hugging Face Spaces
55
+
56
+ ```bash
57
+ cd /path/to/space/healixpath
58
+ git add .
59
+ git commit -m "Initial HealixPath deployment"
60
+ git push
61
+ ```
62
+
63
+ Spaces will automatically build and deploy your application. Check the build logs in the Space settings.
64
+
65
+ ## Docker Deployment (Alternative)
66
+
67
+ If you want to use Docker, create a `Dockerfile` in your Space repository:
68
+
69
+ ```dockerfile
70
+ FROM node:20
71
+
72
+ WORKDIR /app
73
+
74
+ # Install Python
75
+ RUN apt-get update && apt-get install -y python3 python3-pip
76
+
77
+ # Copy project files
78
+ COPY . .
79
+
80
+ # Install Node dependencies
81
+ RUN npm install
82
+ RUN npm run build
83
+
84
+ # Install Python dependencies
85
+ RUN pip install -r requirements.txt
86
+
87
+ # Expose ports
88
+ EXPOSE 7860 3000
89
+
90
+ # Start Gradio app (can be modified to run MCP server)
91
+ CMD ["python", "app.py"]
92
+ ```
93
+
94
+ ## Environment Variables
95
+
96
+ Create a `.env` file for production (not committed to repo):
97
+
98
+ ```env
99
+ ANTHROPIC_API_KEY=your_api_key_here
100
+ HF_TOKEN=your_huggingface_token
101
+ ```
102
+
103
+ ## Monitoring & Logs
104
+
105
+ In Hugging Face Spaces:
106
+ 1. Go to your Space settings
107
+ 2. View "Space runtime" for deployment status
108
+ 3. Check "Logs" for error messages and debugging
109
+
110
+ ## Scaling Considerations
111
+
112
+ - **Gradio Interface**: Runs on port 7860 by default
113
+ - **MCP Server**: Can be run on port 3000 (configure as needed)
114
+ - **Persistent Storage**: Use Hugging Face persistent storage if needed
115
+ - **Hardware**: Start with CPU-basic, upgrade to GPU if needed
116
+
117
+ ## Troubleshooting
118
+
119
+ ### Build Fails
120
+ - Check logs for missing dependencies
121
+ - Verify all files are in the Space repository
122
+ - Ensure `package.json` and `requirements.txt` are correct
123
+
124
+ ### App Won't Start
125
+ - Verify `app_file: app.py` in README.md frontmatter
126
+ - Check Python dependencies with `pip list`
127
+ - Verify data files are present and readable
128
+
129
+ ### Slow Performance
130
+ - Check Space logs for errors
131
+ - Consider upgrading hardware (GPU)
132
+ - Optimize Claude API calls
133
+
134
+ ## Next Steps
135
+
136
+ 1. **Integrate Claude API**: Replace placeholder functions in tools with actual Claude API calls
137
+ 2. **Add Custom Personas**: Extend `data/personas.json` with your domain-specific personas
138
+ 3. **Implement Persistence**: Add database for storing generated stories
139
+ 4. **Add Authentication**: Secure your Space with Hugging Face OAuth
140
+ 5. **Create CI/CD Pipeline**: Automate testing and deployment
PROJECT_SUMMARY.md ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HealixPath - Project Summary
2
+
3
+ ## 🎯 Mission
4
+
5
+ HealixPath is an enterprise-grade **Model Context Protocol (MCP) server** and **Gradio web interface** that generates realistic, actionable user stories grounded in deeply researched personas. It transforms product inputs, personas, problems, and customer journey stages into rich, structured, realistic narratives.
6
+
7
+ ## 📁 Project Structure
8
+
9
+ ```
10
+ healixpath/
11
+ ├── src/
12
+ │ ├── tools/
13
+ │ │ ├── user_story.ts # Generate structured user stories
14
+ │ │ ├── customer_experience_tale.ts # Create experience narratives
15
+ │ │ ├── feature_impact_story.ts # Before/after feature stories
16
+ │ │ └── journey_map_story.ts # Journey stage narratives
17
+ │ ├── utils/
18
+ │ │ ├── persona_loader.ts # Load and manage personas
19
+ │ │ └── helpers.ts # Utility functions
20
+ │ └── index.ts # MCP server initialization
21
+ ├── data/
22
+ │ └── personas.json # Pre-defined personas
23
+ ├── app.py # Gradio web interface
24
+ ├── package.json # Node.js dependencies
25
+ ├── tsconfig.json # TypeScript configuration
26
+ ├── requirements.txt # Python dependencies
27
+ ├── README.md # Project documentation (with HF Spaces config)
28
+ ├── DEPLOYMENT.md # Deployment guide
29
+ ├── mcp.config.json # MCP server configuration
30
+ ├── .env.example # Environment variables template
31
+ └── .gitignore # Git ignore patterns
32
+ ```
33
+
34
+ ## 🔹 Four Core Tools
35
+
36
+ ### 1. **user_story**
37
+ Generates structured narrative user stories with acceptance criteria and risks.
38
+
39
+ **Input:**
40
+ - `product`: Description of the product/feature
41
+ - `persona_id` (optional): ID of the persona (busy_parent, ops_engineer, product_manager)
42
+ - `persona_override` (optional): Custom persona description
43
+
44
+ **Output:**
45
+ ```json
46
+ {
47
+ "story": "Detailed narrative (150-300 words)",
48
+ "acceptance_criteria": ["criterion 1", "criterion 2"],
49
+ "risks": ["risk 1", "risk 2"]
50
+ }
51
+ ```
52
+
53
+ ### 2. **customer_experience_tale**
54
+ Creates narratives describing a persona experiencing a specific problem.
55
+
56
+ **Input:**
57
+ - `problem`: The problem the persona is experiencing
58
+ - `persona_id` (optional): ID of the persona
59
+ - `persona_override` (optional): Custom persona description
60
+
61
+ **Output:**
62
+ ```json
63
+ {
64
+ "title": "Compelling title",
65
+ "narrative": "250-400 word story",
66
+ "pain_points": ["pain 1", "pain 2"],
67
+ "opportunities": ["opportunity 1", "opportunity 2"]
68
+ }
69
+ ```
70
+
71
+ ### 3. **feature_impact_story**
72
+ Shows before and after of a persona interacting with a feature.
73
+
74
+ **Input:**
75
+ - `feature_description`: Description of the feature
76
+ - `persona_id` (optional): ID of the persona
77
+ - `persona_override` (optional): Custom persona description
78
+
79
+ **Output:**
80
+ ```json
81
+ {
82
+ "before_story": "300 word narrative without feature",
83
+ "after_story": "300 word narrative with feature",
84
+ "key_benefits": ["benefit 1", "benefit 2"],
85
+ "success_metrics": ["metric 1", "metric 2"]
86
+ }
87
+ ```
88
+
89
+ ### 4. **journey_map_story**
90
+ Generates narrative for specific stages of the user journey.
91
+
92
+ **Input:**
93
+ - `stage`: Journey stage (awareness, consideration, adoption, retention)
94
+ - `product`: Description of the product
95
+ - `persona_id` (optional): ID of the persona
96
+ - `persona_override` (optional): Custom persona description
97
+
98
+ **Output:**
99
+ ```json
100
+ {
101
+ "stage": "adoption",
102
+ "narrative": "250-300 word narrative",
103
+ "touchpoints": ["touchpoint 1", "touchpoint 2"],
104
+ "emotions": ["emotion 1", "emotion 2"],
105
+ "breakdowns": ["breakdown 1", "breakdown 2"],
106
+ "opportunities": ["opportunity 1", "opportunity 2"]
107
+ }
108
+ ```
109
+
110
+ ## 👥 Built-in Personas
111
+
112
+ ### 1. **Busy Parent** (`busy_parent`)
113
+ - **Role**: Working parent of two kids
114
+ - **Goals**: Save time, reduce mental load, keep kids on schedule
115
+ - **Tech Comfort**: Medium
116
+ - **Quote**: "If it's not simple, I don't have time for it."
117
+
118
+ ### 2. **Ops Engineer** (`ops_engineer`)
119
+ - **Role**: On-call site reliability engineer
120
+ - **Goals**: Reduce alerts, improve stability, automate tasks
121
+ - **Tech Comfort**: High
122
+ - **Quote**: "If it breaks, it's my problem at 3am."
123
+
124
+ ### 3. **Product Manager** (`product_manager`)
125
+ - **Role**: PM at a healthcare startup
126
+ - **Goals**: Understand users deeply, make data-driven decisions, validate quickly
127
+ - **Tech Comfort**: High
128
+ - **Quote**: "I need to understand my users' hearts, not just their actions."
129
+
130
+ ## 🚀 Getting Started
131
+
132
+ ### Prerequisites
133
+ - Node.js 20+
134
+ - Python 3.10+
135
+ - npm or yarn
136
+
137
+ ### Installation
138
+
139
+ ```bash
140
+ # Install Node dependencies
141
+ npm install
142
+
143
+ # Install Python dependencies
144
+ pip install -r requirements.txt
145
+ ```
146
+
147
+ ### Development
148
+
149
+ ```bash
150
+ # Build TypeScript
151
+ npm run build
152
+
153
+ # Run MCP Server
154
+ npm run start
155
+
156
+ # Run Gradio Interface (in another terminal)
157
+ python app.py
158
+ ```
159
+
160
+ ### Production
161
+
162
+ ```bash
163
+ # Build for production
164
+ npm run build
165
+
166
+ # Deploy to Hugging Face Spaces
167
+ git push # (after setting up Space repo)
168
+ ```
169
+
170
+ ## 🔧 Configuration
171
+
172
+ ### Hugging Face Spaces YAML (in README.md)
173
+
174
+ ```yaml
175
+ ---
176
+ title: HealixPath
177
+ emoji: 💚
178
+ colorFrom: green
179
+ colorTo: blue
180
+ sdk: gradio
181
+ sdk_version: 5.49.1
182
+ app_file: app.py
183
+ pinned: true
184
+ short_description: AI-powered persona storytelling engine
185
+ tags:
186
+ - mcp-hackathon
187
+ - building-mcp-track-enterprise
188
+ - healthcare
189
+ - ai
190
+ ---
191
+ ```
192
+
193
+ ### Environment Variables
194
+
195
+ Create `.env` file (see `.env.example`):
196
+
197
+ ```env
198
+ ANTHROPIC_API_KEY=sk_your_key_here
199
+ HF_TOKEN=hf_your_token_here
200
+ GRADIO_SERVER_PORT=7860
201
+ ```
202
+
203
+ ## 🌐 User Interfaces
204
+
205
+ ### MCP Server (Node.js)
206
+ - **Port**: Configurable (default 3000)
207
+ - **Integration**: Works with Claude, other AI models, and custom applications
208
+ - **Usage**: See `src/index.ts` for implementation example
209
+
210
+ ### Gradio Web Interface (Python)
211
+ - **Port**: 7860 (Hugging Face Spaces default)
212
+ - **Features**:
213
+ - Interactive UI with 4 tabs (one for each tool)
214
+ - Pre-loaded personas dropdown
215
+ - Custom persona input
216
+ - Real-time generation
217
+
218
+ ## 📚 Key Technologies
219
+
220
+ ### Backend
221
+ - **TypeScript** - Type-safe JavaScript
222
+ - **Node.js** - JavaScript runtime
223
+ - **Model Context Protocol (MCP)** - Standard interface for AI assistants
224
+ - **Anthropic SDK** - Claude API integration
225
+
226
+ ### Frontend
227
+ - **Gradio** - Python web framework for ML demos
228
+ - **Python** - Scripting language
229
+
230
+ ### Deployment
231
+ - **Hugging Face Spaces** - Free hosting for ML demos
232
+ - **Docker** - Containerization (optional)
233
+ - **Git** - Version control
234
+
235
+ ## 🎯 Hackathon Features
236
+
237
+ ✨ **Ready for Demo:**
238
+ - Complete MCP server implementation
239
+ - Interactive Gradio web UI
240
+ - Pre-loaded sample personas
241
+ - Hugging Face Spaces configuration
242
+ - Full project documentation
243
+ - Example tool calls in index.ts
244
+
245
+ 🔌 **Integration Ready:**
246
+ - Works with Claude API (placeholder ready for integration)
247
+ - Standard MCP interface for tools
248
+ - JSON-based I/O for easy integration
249
+ - Extensible persona system
250
+
251
+ 🚀 **Deploy Ready:**
252
+ - One-click deployment to Hugging Face Spaces
253
+ - Docker support for custom deployments
254
+ - Environment variable configuration
255
+ - Logging and monitoring
256
+
257
+ ## 📋 Next Steps for Production
258
+
259
+ 1. **API Integration**: Replace placeholder functions with actual Claude API calls
260
+ 2. **Custom Personas**: Add domain-specific personas for your use case
261
+ 3. **Data Persistence**: Connect to database for storing generated stories
262
+ 4. **Authentication**: Add user authentication with Hugging Face OAuth
263
+ 5. **Caching**: Implement Redis for response caching
264
+ 6. **Testing**: Add comprehensive unit and integration tests
265
+ 7. **Monitoring**: Set up error tracking and analytics
266
+ 8. **Documentation**: Add API documentation and user guides
267
+
268
+ ## 🤝 Contributing
269
+
270
+ To extend HealixPath:
271
+
272
+ 1. Add new personas to `data/personas.json`
273
+ 2. Create new tools in `src/tools/`
274
+ 3. Update `src/index.ts` to register new tools
275
+ 4. Add corresponding UI tabs in `app.py`
276
+ 5. Test with MCP server examples
277
+
278
+ ## 📄 License
279
+
280
+ MIT License - See LICENSE file for details
281
+
282
+ ## 🏆 Built for MCP Hackathon
283
+
284
+ HealixPath is an enterprise-ready solution demonstrating the power of MCP in building AI-driven applications for real-world use cases in healthcare, product management, and UX design.
285
+
286
+ ---
287
+
288
+ **Version**: 1.0.0
289
+ **Last Updated**: November 2025
290
+ **Status**: Production Ready for Hackathon Demo
QUICKSTART.md ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HealixPath - Quick Start Guide
2
+
3
+ ## 🚀 30-Second Setup
4
+
5
+ ```bash
6
+ # 1. Install dependencies
7
+ npm install
8
+ pip install -r requirements.txt
9
+
10
+ # 2. Build TypeScript
11
+ npm run build
12
+
13
+ # 3. Run Gradio App
14
+ python app.py
15
+
16
+ # 4. Open browser to http://localhost:7860
17
+ ```
18
+
19
+ ## 📖 60-Second Demo
20
+
21
+ 1. **Open the Gradio UI** at `http://localhost:7860`
22
+ 2. **Navigate to "User Story" tab**
23
+ 3. **Enter Product**: "Healthcare appointment scheduling app"
24
+ 4. **Select Persona**: "Busy Parent"
25
+ 5. **Click "Generate User Story"**
26
+ 6. **See the generated narrative and acceptance criteria!**
27
+
28
+ ## 🔧 MCP Server Usage
29
+
30
+ ### Start the Server
31
+
32
+ ```bash
33
+ # Terminal 1: Start MCP Server
34
+ npm run start
35
+ ```
36
+
37
+ ### Use with Claude (Terminal 2)
38
+
39
+ ```bash
40
+ # Example: Call user_story tool
41
+ curl -X POST http://localhost:3000/tool/user_story \
42
+ -H "Content-Type: application/json" \
43
+ -d '{
44
+ "product": "Healthcare platform",
45
+ "persona_id": "busy_parent"
46
+ }'
47
+ ```
48
+
49
+ ## 📁 Key Files to Modify
50
+
51
+ ### Add Custom Personas
52
+ Edit `data/personas.json`:
53
+ ```json
54
+ {
55
+ "id": "custom_persona",
56
+ "name": "Custom Name",
57
+ "role": "Role description",
58
+ "goals": ["goal 1", "goal 2"],
59
+ "frustrations": ["frustration 1"],
60
+ "tech_comfort": "medium",
61
+ "quote": "Inspirational quote"
62
+ }
63
+ ```
64
+
65
+ ### Connect Claude API
66
+ In `src/tools/user_story.ts`:
67
+ ```typescript
68
+ // Replace placeholder with actual Claude call
69
+ import Anthropic from "@anthropic-sdk/sdk";
70
+
71
+ const client = new Anthropic({
72
+ apiKey: process.env.ANTHROPIC_API_KEY,
73
+ });
74
+
75
+ const response = await client.messages.create({
76
+ model: "claude-3-5-sonnet-20241022",
77
+ max_tokens: 1024,
78
+ messages: [{ role: "user", content: userPrompt }],
79
+ });
80
+ ```
81
+
82
+ ## 🌐 Deploy to Hugging Face Spaces
83
+
84
+ ### 1. Create Space
85
+ - Go to [huggingface.co/new-space](https://huggingface.co/new-space)
86
+ - Choose "Gradio" as SDK
87
+ - Name it "healixpath"
88
+
89
+ ### 2. Push Code
90
+ ```bash
91
+ git clone https://huggingface.co/spaces/<username>/healixpath
92
+ cd healixpath
93
+ # Copy all files from local repo
94
+ git add .
95
+ git commit -m "Deploy HealixPath"
96
+ git push
97
+ ```
98
+
99
+ ### 3. Space Auto-Deploys
100
+ - Hugging Face automatically builds and deploys
101
+ - Your app is live at `huggingface.co/spaces/<username>/healixpath`
102
+
103
+ ## 🎯 Tool Examples
104
+
105
+ ### Generate User Story
106
+ **Input:**
107
+ ```json
108
+ {
109
+ "product": "Mental health mobile app",
110
+ "persona_id": "busy_parent"
111
+ }
112
+ ```
113
+
114
+ **Output:**
115
+ ```json
116
+ {
117
+ "story": "As a busy parent...",
118
+ "acceptance_criteria": ["...", "...", "..."],
119
+ "risks": ["..."]
120
+ }
121
+ ```
122
+
123
+ ### Generate Experience Tale
124
+ **Input:**
125
+ ```json
126
+ {
127
+ "problem": "App crashes when uploading large files",
128
+ "persona_id": "ops_engineer"
129
+ }
130
+ ```
131
+
132
+ ### Generate Feature Impact
133
+ **Input:**
134
+ ```json
135
+ {
136
+ "feature_description": "Offline mode with sync",
137
+ "persona_id": "busy_parent"
138
+ }
139
+ ```
140
+
141
+ ### Generate Journey Map
142
+ **Input:**
143
+ ```json
144
+ {
145
+ "stage": "adoption",
146
+ "product": "Healthcare platform",
147
+ "persona_id": "product_manager"
148
+ }
149
+ ```
150
+
151
+ ## 🐛 Troubleshooting
152
+
153
+ ### Port Already in Use
154
+ ```bash
155
+ # Kill process on port 7860
156
+ # Windows:
157
+ netstat -ano | findstr :7860
158
+ taskkill /PID <PID> /F
159
+
160
+ # Mac/Linux:
161
+ lsof -ti:7860 | xargs kill -9
162
+ ```
163
+
164
+ ### Missing Dependencies
165
+ ```bash
166
+ # Reinstall all
167
+ rm -rf node_modules
168
+ npm install
169
+ pip install -r requirements.txt --force-reinstall
170
+ ```
171
+
172
+ ### Gradio Won't Start
173
+ ```bash
174
+ # Check Python version
175
+ python --version # Should be 3.10+
176
+
177
+ # Check Gradio installation
178
+ pip show gradio
179
+ ```
180
+
181
+ ### Build Errors
182
+ ```bash
183
+ # Check TypeScript syntax
184
+ npm run build
185
+
186
+ # View error details
187
+ cat dist/*.d.ts
188
+ ```
189
+
190
+ ## 📚 Documentation
191
+
192
+ - **Full Documentation**: See `README.md`
193
+ - **Project Summary**: See `PROJECT_SUMMARY.md`
194
+ - **Deployment Guide**: See `DEPLOYMENT.md`
195
+ - **API Reference**: Check `src/index.ts` for tool definitions
196
+
197
+ ## 🎓 Learning Resources
198
+
199
+ ### Understanding Personas
200
+ Each persona has:
201
+ - **Goals**: What they want to achieve
202
+ - **Frustrations**: What blocks them
203
+ - **Quote**: Their perspective
204
+ - **Tech Comfort**: Skill level (low/medium/high)
205
+
206
+ ### Story Generation Workflow
207
+ 1. Load persona data → 2. Create context → 3. Generate with AI → 4. Format output → 5. Return JSON
208
+
209
+ ### MCP Protocol
210
+ - Tools are registered with name, description, input schema
211
+ - Input schema defines required/optional parameters
212
+ - Output is always JSON
213
+ - Errors are caught and returned as JSON
214
+
215
+ ## 🚀 Next Steps
216
+
217
+ 1. ✅ Get it running locally
218
+ 2. ✅ Try each tool with different personas
219
+ 3. ✅ Customize personas for your domain
220
+ 4. ✅ Deploy to Hugging Face Spaces
221
+ 5. ✅ Integrate Claude API for real generations
222
+ 6. ✅ Share with your team!
223
+
224
+ ## 💡 Tips & Tricks
225
+
226
+ - **Persona Override**: Use custom persona text if ID not found
227
+ - **Batch Generation**: Call tools multiple times for different personas
228
+ - **JSON Export**: Copy generated JSON for further processing
229
+ - **Gradio Sharing**: Use `demo.share()` in `app.py` for public URL
230
+
231
+ ## 📞 Support
232
+
233
+ For issues or questions:
234
+ 1. Check `DEPLOYMENT.md` for deployment issues
235
+ 2. Review `PROJECT_SUMMARY.md` for architecture details
236
+ 3. Inspect `src/index.ts` for MCP implementation
237
+ 4. Check Gradio docs at [gradio.app](https://www.gradio.app)
238
+
239
+ ---
240
+
241
+ **Happy Storytelling! 🎭**
SETUP_COMPLETE.md ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🎉 HealixPath - Complete Project Setup Summary
2
+
3
+ ## ✅ Project Successfully Created!
4
+
5
+ Your HealixPath MCP server and Gradio web interface is now fully set up and ready for the hackathon.
6
+
7
+ ---
8
+
9
+ ## 📊 What Was Built
10
+
11
+ ### ✨ Enterprise-Ready Architecture
12
+
13
+ **HealixPath** is a dual-interface system combining:
14
+ 1. **MCP Server** (TypeScript/Node.js) - For AI model integration
15
+ 2. **Gradio Web Interface** (Python) - For interactive UI
16
+ 3. **Hugging Face Spaces Config** - For one-click deployment
17
+
18
+ ---
19
+
20
+ ## 📁 Complete Project Structure
21
+
22
+ ```
23
+ HealixPath/
24
+ ├── 📄 Core Configuration
25
+ │ ├── README.md ✅ Main docs with HF Spaces config
26
+ │ ├── package.json ✅ Node.js dependencies
27
+ │ ├── tsconfig.json ✅ TypeScript configuration
28
+ │ ├── requirements.txt ✅ Python dependencies
29
+ │ └── .gitignore ✅ Git ignore patterns
30
+ │
31
+ ├── 📚 Documentation
32
+ │ ├── QUICKSTART.md ✅ 30-60 second setup guide
33
+ │ ├── PROJECT_SUMMARY.md ✅ Complete architecture docs
34
+ │ ├── DEPLOYMENT.md ✅ Deployment guide
35
+ │ ├── .env.example ✅ Environment template
36
+ │ └── mcp.config.json ✅ MCP server config
37
+ │
38
+ ├── 🔧 Backend (TypeScript/Node.js)
39
+ │ └── src/
40
+ │ ├── index.ts ✅ MCP server main file
41
+ │ ├── tools/
42
+ │ │ ├── user_story.ts ✅ Generate user stories
43
+ │ │ ├── customer_experience_tale.ts ✅ Experience narratives
44
+ │ │ ├── feature_impact_story.ts ✅ Before/after stories
45
+ │ │ └── journey_map_story.ts ✅ Journey narratives
46
+ │ └── utils/
47
+ │ ├── persona_loader.ts ✅ Persona management
48
+ │ ├── helpers.ts ✅ Helper utilities
49
+ │ └── prompts.ts ✅ Prompt templates
50
+ │
51
+ ├── 🎨 Frontend (Python/Gradio)
52
+ │ └── app.py ✅ Interactive web interface
53
+ │
54
+ └── 👥 Data
55
+ └── data/
56
+ └── personas.json ✅ 3 pre-defined personas
57
+ ```
58
+
59
+ ---
60
+
61
+ ## 🔹 Four Core Tools Built
62
+
63
+ | Tool | Purpose | Input | Output |
64
+ |------|---------|-------|--------|
65
+ | **user_story** | Generate structured user stories | Product + Persona | Story + Acceptance Criteria + Risks |
66
+ | **customer_experience_tale** | Create problem narratives | Problem + Persona | Title + Narrative + Pain Points + Opportunities |
67
+ | **feature_impact_story** | Before/after feature impact | Feature + Persona | Before Story + After Story + Benefits + Metrics |
68
+ | **journey_map_story** | Journey stage narratives | Stage + Product + Persona | Stage + Narrative + Touchpoints + Emotions + Breakdowns |
69
+
70
+ ---
71
+
72
+ ## 👥 Pre-Built Personas
73
+
74
+ 1. **Busy Parent** - Working parent juggling responsibilities
75
+ 2. **Ops Engineer** - On-call SRE managing infrastructure
76
+ 3. **Product Manager** - PM at healthcare startup
77
+
78
+ *Easily extensible for domain-specific personas*
79
+
80
+ ---
81
+
82
+ ## 🚀 Quick Start Commands
83
+
84
+ ### Install & Build
85
+ ```bash
86
+ npm install
87
+ npm run build
88
+ pip install -r requirements.txt
89
+ ```
90
+
91
+ ### Run MCP Server
92
+ ```bash
93
+ npm run start
94
+ ```
95
+
96
+ ### Run Gradio Web Interface
97
+ ```bash
98
+ python app.py
99
+ # Opens at http://localhost:7860
100
+ ```
101
+
102
+ ### Deploy to Hugging Face Spaces
103
+ ```bash
104
+ git clone https://huggingface.co/spaces/<username>/healixpath
105
+ cd healixpath
106
+ # Copy all files from this repo
107
+ git add . && git commit -m "Deploy HealixPath" && git push
108
+ ```
109
+
110
+ ---
111
+
112
+ ## ✨ Key Features Implemented
113
+
114
+ ### ✅ MCP Server
115
+ - ✅ Complete tool definitions with JSON schemas
116
+ - ✅ Persona loader and management
117
+ - ✅ Tool processor with error handling
118
+ - ✅ Example tool calls demonstrating usage
119
+
120
+ ### ✅ Gradio Interface
121
+ - ✅ 4 interactive tabs (one per tool)
122
+ - ✅ Persona dropdown selector
123
+ - ✅ Custom persona input support
124
+ - ✅ Real-time JSON output display
125
+
126
+ ### ✅ Configuration
127
+ - ✅ Hugging Face Spaces YAML frontmatter
128
+ - ✅ Environment variable support
129
+ - ✅ Production-ready settings
130
+ - ✅ Comprehensive documentation
131
+
132
+ ### ✅ Deployment
133
+ - ✅ Docker-ready structure
134
+ - ✅ HF Spaces configuration
135
+ - ✅ Environment template (.env.example)
136
+ - ✅ Deployment guide
137
+
138
+ ---
139
+
140
+ ## 📖 Documentation Provided
141
+
142
+ | Document | Purpose | Key Sections |
143
+ |----------|---------|--------------|
144
+ | **README.md** | Main documentation | Overview, Features, Quick Start, Architecture, Config Reference |
145
+ | **QUICKSTART.md** | 30-60 second guide | Setup, Demo, Tool Examples, Troubleshooting, Next Steps |
146
+ | **PROJECT_SUMMARY.md** | Complete reference | Architecture, Tools, Personas, Technologies, Production Roadmap |
147
+ | **DEPLOYMENT.md** | Deployment guide | Prerequisites, Steps, Docker, Environment Variables, Monitoring |
148
+
149
+ ---
150
+
151
+ ## 🎯 Hugging Face Spaces Configuration
152
+
153
+ Your `README.md` includes the complete YAML configuration:
154
+
155
+ ```yaml
156
+ ---
157
+ title: HealixPath
158
+ emoji: 💚
159
+ colorFrom: green
160
+ colorTo: blue
161
+ sdk: gradio
162
+ sdk_version: 5.49.1
163
+ app_file: app.py
164
+ pinned: true
165
+ short_description: AI-powered persona storytelling engine
166
+ tags:
167
+ - mcp-hackathon
168
+ - building-mcp-track-enterprise
169
+ ---
170
+ ```
171
+
172
+ **Ready for deployment** - just push to Hugging Face Spaces!
173
+
174
+ ---
175
+
176
+ ## 🔧 Technology Stack
177
+
178
+ ### Backend
179
+ - **TypeScript** - Type-safe development
180
+ - **Node.js** - JavaScript runtime
181
+ - **Model Context Protocol** - Standard MCP interface
182
+ - **Anthropic SDK** - Claude API integration (ready for implementation)
183
+
184
+ ### Frontend
185
+ - **Gradio** - Web interface framework
186
+ - **Python** - Backend scripting
187
+
188
+ ### Deployment
189
+ - **Hugging Face Spaces** - Hosting
190
+ - **Docker** - Containerization ready
191
+ - **Git** - Version control
192
+
193
+ ---
194
+
195
+ ## 📋 Implementation Status
196
+
197
+ ### ✅ Complete
198
+ - [x] Project structure
199
+ - [x] MCP server with 4 tools
200
+ - [x] Tool definitions with schemas
201
+ - [x] Persona system (3 personas)
202
+ - [x] Gradio web interface
203
+ - [x] TypeScript utilities
204
+ - [x] HF Spaces configuration
205
+ - [x] Environment setup
206
+ - [x] Complete documentation
207
+ - [x] Quick start guide
208
+
209
+ ### 🔜 Next Steps (for Production)
210
+ - [ ] Integrate Claude API calls
211
+ - [ ] Add database persistence
212
+ - [ ] Implement caching (Redis)
213
+ - [ ] Add user authentication
214
+ - [ ] Create test suite
215
+ - [ ] Set up CI/CD pipeline
216
+ - [ ] Add monitoring/analytics
217
+
218
+ ---
219
+
220
+ ## 🎓 How to Use
221
+
222
+ ### For Hackathon Demo
223
+ 1. Run `python app.py`
224
+ 2. Show the Gradio interface
225
+ 3. Demonstrate each tool with sample data
226
+ 4. Show generated JSON output
227
+ 5. Show deployment to Hugging Face Spaces
228
+
229
+ ### For Development
230
+ 1. Follow QUICKSTART.md
231
+ 2. Modify personas in `data/personas.json`
232
+ 3. Update tool implementations
233
+ 4. Test via MCP server
234
+ 5. Deploy to Spaces
235
+
236
+ ### For Integration
237
+ 1. Build the TypeScript: `npm run build`
238
+ 2. Use MCP server for Claude integration
239
+ 3. Reference tool schemas in `src/index.ts`
240
+ 4. Follow MCP protocol for tool calls
241
+
242
+ ---
243
+
244
+ ## 🌐 Deployment Ready
245
+
246
+ Your project is **instantly deployable** to Hugging Face Spaces:
247
+
248
+ ```bash
249
+ # Create space at huggingface.co/new-space
250
+ # Choose Gradio SDK
251
+ # Then:
252
+ git clone https://huggingface.co/spaces/<user>/healixpath
253
+ cd healixpath
254
+ # Copy files and push
255
+ git push
256
+ ```
257
+
258
+ **That's it!** Spaces auto-builds and deploys.
259
+
260
+ ---
261
+
262
+ ## 💡 Pro Tips
263
+
264
+ 1. **Customize Personas**: Edit `data/personas.json` for your domain
265
+ 2. **Add Claude**: Replace placeholder functions with `new Anthropic()` calls
266
+ 3. **Extend Tools**: Create new tools in `src/tools/` following the pattern
267
+ 4. **Scale UI**: Modify `app.py` for different layouts or features
268
+ 5. **Monitor**: Use HF Spaces build logs for debugging
269
+
270
+ ---
271
+
272
+ ## 📞 Support Resources
273
+
274
+ - **Gradio Docs**: https://www.gradio.app/docs
275
+ - **HF Spaces Guide**: https://huggingface.co/docs/hub/spaces
276
+ - **TypeScript Docs**: https://www.typescriptlang.org/docs/
277
+ - **MCP Spec**: https://modelcontextprotocol.io/
278
+ - **Anthropic Docs**: https://docs.anthropic.com
279
+
280
+ ---
281
+
282
+ ## 🏆 Hackathon Submission
283
+
284
+ Your HealixPath project includes:
285
+
286
+ ✅ **Enterprise Architecture** - Production-ready MCP server
287
+ ✅ **Web Interface** - Interactive Gradio UI
288
+ ✅ **Pre-Built Personas** - Real user archetypes
289
+ ✅ **Four Tools** - Generate different story types
290
+ ✅ **Full Documentation** - Complete guides and references
291
+ ✅ **Ready to Deploy** - One-click HF Spaces deployment
292
+ ✅ **Extensible Design** - Easy to customize and scale
293
+
294
+ **All requirements met. Ready to submit! 🚀**
295
+
296
+ ---
297
+
298
+ ## 📈 Next Actions
299
+
300
+ ### Immediate (Before Hackathon Demo)
301
+ 1. ✅ Run `npm install` and `pip install -r requirements.txt`
302
+ 2. ✅ Test with `python app.py`
303
+ 3. ✅ Try each tool with different personas
304
+ 4. ✅ Create HF Spaces account if needed
305
+
306
+ ### Short Term (For Polish)
307
+ 1. Integrate Claude API for real generations
308
+ 2. Add custom error handling
309
+ 3. Create demo personas for your domain
310
+ 4. Record screen capture of interface
311
+
312
+ ### Medium Term (For Production)
313
+ 1. Add persistent storage (database)
314
+ 2. Implement authentication
315
+ 3. Add caching layer
316
+ 4. Create CI/CD pipeline
317
+
318
+ ---
319
+
320
+ **🎉 Congratulations! Your HealixPath project is complete and ready to shine!**
321
+
322
+ *Built with ❤️ for the MCP Hackathon*
WSL_SETUP_FIXED.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WSL NPM Setup - Fix Summary
2
+
3
+ ## ✅ Issues Fixed
4
+
5
+ ### 1. **npm Not Found in WSL**
6
+ - **Problem**: npm wasn't installed in WSL Ubuntu environment
7
+ - **Solution**: Verified Node.js 18+ and npm 9.2.0 were already installed via apt
8
+ - **Result**: ✅ npm and Node.js ready to use
9
+
10
+ ### 2. **Incorrect Anthropic SDK Package Name**
11
+ - **Problem**: `@anthropic-sdk/sdk@^0.24.0` doesn't exist in npm registry
12
+ - **Original**: `@anthropic-sdk/sdk`
13
+ - **Fixed to**: `@anthropic-ai/sdk@^0.70.0`
14
+ - **Result**: ✅ Package found and installed
15
+
16
+ ### 3. **TypeScript Compilation Errors**
17
+ - **Problem**: Strict type casting issues in `src/index.ts`
18
+ - **Solution**: Changed casts to `as unknown as TypeName` format
19
+ - **Result**: ✅ TypeScript compiles successfully
20
+
21
+ ### 4. **Deprecated Import in helpers.ts**
22
+ - **Problem**: `@anthropic-sdk/sdk` import path was incorrect
23
+ - **Fixed to**: `@anthropic-ai/sdk`
24
+ - **Result**: ✅ Import resolves correctly
25
+
26
+ ### 5. **Unsupported API Parameter**
27
+ - **Problem**: `response_format` parameter not supported in SDK v0.70.0
28
+ - **Solution**: Removed `response_format` from Anthropic API call
29
+ - **Result**: ✅ API call compatible
30
+
31
+ ### 6. **Python Virtual Environment**
32
+ - **Problem**: System Python had externally-managed environment restrictions
33
+ - **Solution**: Created `venv` virtual environment
34
+ - **Result**: ✅ All Python packages installed in venv
35
+
36
+ ## 📦 What's Installed
37
+
38
+ ### Node.js Packages
39
+ ```
40
+ ├── @anthropic-ai/sdk@0.70.1
41
+ ├── @types/node@20.19.25
42
+ ├── dotenv@16.6.1
43
+ └── typescript@5.9.3
44
+ ```
45
+
46
+ ### Python Packages (in venv)
47
+ - gradio@5.49.1
48
+ - anthropic@0.74.1
49
+ - pydantic@2.11.10
50
+ - python-dotenv@1.2.1
51
+ - *(and all dependencies)*
52
+
53
+ ## 🚀 Ready to Use
54
+
55
+ ### From WSL Terminal
56
+ ```bash
57
+ # Navigate to project
58
+ cd /mnt/c/Users/rarev/Code/TeamHealix
59
+
60
+ # Activate Python environment
61
+ source venv/bin/activate
62
+
63
+ # Build TypeScript
64
+ npm run build
65
+
66
+ # Run MCP Server
67
+ npm run start
68
+
69
+ # Or run Gradio app (in another terminal)
70
+ python app.py
71
+ ```
72
+
73
+ ### Quick Setup Script
74
+ ```bash
75
+ bash setup-wsl.sh
76
+ ```
77
+
78
+ ## 📋 Project Status
79
+
80
+ ✅ TypeScript compiles without errors
81
+ ✅ All npm dependencies installed
82
+ ✅ All Python dependencies installed (in venv)
83
+ ✅ Node.js v18.19.1 and npm v9.2.0 available
84
+ ✅ Python 3.12 available
85
+ ✅ Ready for hackathon demo
86
+
87
+ ## 🔧 If Issues Persist
88
+
89
+ 1. **Verify npm in WSL**:
90
+ ```bash
91
+ wsl bash -c "npm --version"
92
+ ```
93
+
94
+ 2. **Rebuild from scratch**:
95
+ ```bash
96
+ wsl bash -c "cd /mnt/c/Users/rarev/Code/TeamHealix && rm -rf node_modules venv && npm install"
97
+ ```
98
+
99
+ 3. **Check TypeScript build**:
100
+ ```bash
101
+ wsl bash -c "cd /mnt/c/Users/rarev/Code/TeamHealix && npm run build"
102
+ ```
103
+
104
+ ---
105
+
106
+ **Your HealixPath project is now fully configured for WSL! 🎉**
app.py CHANGED
@@ -1,7 +1,357 @@
 
 
 
 
 
 
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
1
+ """
2
+ HealixPath Gradio Web Interface
3
+
4
+ A web interface for generating AI-powered persona-driven narratives.
5
+ """
6
+
7
  import gradio as gr
8
+ import json
9
+ import subprocess
10
+ import os
11
+ from pathlib import Path
12
+ from dotenv import load_dotenv
13
+ from anthropic import Anthropic
14
+
15
+ # Load environment variables from .env file
16
+ load_dotenv()
17
+
18
+ # Load personas
19
+ def load_personas():
20
+ with open("data/personas.json") as f:
21
+ return json.load(f)
22
+
23
+ personas = load_personas()
24
+
25
+ # Create persona descriptions for dropdown display
26
+ def create_persona_description(p):
27
+ """Create a short description of a persona."""
28
+ age = p.get("age", "")
29
+ job_title = p.get("job", {}).get("title", "")
30
+ location_city = p.get("location", {}).get("city", "")
31
+ return f"{p['name']} • {age}yo {job_title} • {location_city}"
32
+
33
+ # Map display names to persona IDs
34
+ persona_options = {create_persona_description(p): p["id"] for p in personas}
35
+ CUSTOM_PERSONA_LABEL = "Other (Custom Persona)"
36
+ persona_list = list(persona_options.keys())
37
+ persona_choices = [CUSTOM_PERSONA_LABEL] + persona_list
38
+ default_persona_choice = persona_list[0] if persona_list else CUSTOM_PERSONA_LABEL
39
+
40
+ # Initialize Anthropic client
41
+ api_key = os.getenv("ANTHROPIC_API_KEY")
42
+ model = os.getenv("ANTHROPIC_MODEL", "claude-3-haiku-20240307")
43
+ client = Anthropic(api_key=api_key) if api_key else None
44
+
45
+ def get_persona_context(persona_id: str, custom_persona: str = "") -> str:
46
+ """Format persona data for prompt context."""
47
+ if custom_persona:
48
+ return f"Persona: {custom_persona}"
49
+
50
+ for p in personas:
51
+ if p["id"] == persona_id:
52
+ # Handle new persona structure
53
+ job_title = p.get("job", {}).get("title", "Unknown")
54
+ industry = p.get("job", {}).get("industry", "Unknown")
55
+ age = p.get("age", "Unknown")
56
+ location_city = p.get("location", {}).get("city", "Unknown")
57
+ goals = p.get("goals", {}).get("primary_goals", [])
58
+ pain_points = p.get("pain_points", [])
59
+ motivations = p.get("motivations", [])
60
+
61
+ return f"""Persona: {p["name"]}
62
+ Age: {age}
63
+ Location: {location_city}
64
+ Title: {job_title}
65
+ Industry: {industry}
66
+ Background: {p.get("background", "")}
67
+ Goals: {', '.join(goals) if goals else "N/A"}
68
+ Pain Points: {', '.join(pain_points) if pain_points else "N/A"}
69
+ Motivations: {', '.join(motivations) if motivations else "N/A"}
70
+ User Story: {p.get("user_story", "")}"""
71
+
72
+ return "Persona: Default user"
73
+
74
+
75
+ def build_persona_profile(persona_name: str, persona_override: str):
76
+ """Return the persona label for display and the context payload."""
77
+ if persona_name == CUSTOM_PERSONA_LABEL:
78
+ custom_label = persona_override.strip() or "Custom Persona"
79
+ context = get_persona_context("", custom_label)
80
+ return custom_label, context
81
+
82
+ persona_id = persona_options.get(persona_name, "busy_parent")
83
+ context = get_persona_context(persona_id)
84
+ return persona_name or "Persona", context
85
+
86
+
87
+ def toggle_custom_persona(selected_value: str):
88
+ """Show the custom persona textbox only when 'Other' is selected."""
89
+ show_custom = selected_value == CUSTOM_PERSONA_LABEL
90
+ return gr.update(visible=show_custom, value="" if not show_custom else None)
91
+
92
+ def generate_with_claude(system_prompt: str, user_prompt: str) -> str:
93
+ """Call Claude API and return structured response."""
94
+ if not client or not api_key:
95
+ return json.dumps({
96
+ "error": "ANTHROPIC_API_KEY not configured",
97
+ "message": "Please add your ANTHROPIC_API_KEY to the .env file"
98
+ }, indent=2)
99
+
100
+ try:
101
+ message = client.messages.create(
102
+ model=model,
103
+ max_tokens=1024,
104
+ system=system_prompt,
105
+ messages=[
106
+ {"role": "user", "content": user_prompt}
107
+ ]
108
+ )
109
+ return message.content[0].text
110
+ except Exception as e:
111
+ return json.dumps({
112
+ "error": str(type(e).__name__),
113
+ "message": str(e)
114
+ }, indent=2)
115
+
116
+ def generate_user_story(product: str, persona_name: str, persona_override: str):
117
+ """Generate a user story for the given product and persona."""
118
+ _, persona_context = build_persona_profile(persona_name, persona_override)
119
+
120
+ system_prompt = """You are an expert UX writer and product strategist.
121
+ Generate a structured user story in JSON format with the following fields:
122
+ - story: A concise user story
123
+ - acceptance_criteria: Array of 3-5 acceptance criteria
124
+ - risks: Array of 2-3 potential risks or challenges
125
+
126
+ Return ONLY valid JSON, no additional text."""
127
+
128
+ user_prompt = f"""{persona_context}
129
+
130
+ Generate a user story for this persona using the product: {product}
131
+
132
+ Format as JSON with the keys: story, acceptance_criteria (array), risks (array)"""
133
+
134
+ response = generate_with_claude(system_prompt, user_prompt)
135
+ try:
136
+ # Try to parse and re-format as pretty JSON
137
+ data = json.loads(response)
138
+ return json.dumps(data, indent=2)
139
+ except:
140
+ return response
141
+
142
+ def generate_experience_tale(problem: str, persona_name: str, persona_override: str):
143
+ """Generate a customer experience tale."""
144
+ _, persona_context = build_persona_profile(persona_name, persona_override)
145
+
146
+ system_prompt = """You are an expert in customer experience and user research.
147
+ Generate a narrative about a persona experiencing a problem in JSON format with:
148
+ - title: A compelling title
149
+ - narrative: A detailed story (2-3 paragraphs)
150
+ - pain_points: Array of 3-4 pain points
151
+ - opportunities: Array of 2-3 improvement opportunities
152
+
153
+ Return ONLY valid JSON, no additional text."""
154
+
155
+ user_prompt = f"""{persona_context}
156
+
157
+ Describe how this persona experiences this problem: {problem}
158
+
159
+ Format as JSON with keys: title, narrative, pain_points (array), opportunities (array)"""
160
+
161
+ response = generate_with_claude(system_prompt, user_prompt)
162
+ try:
163
+ data = json.loads(response)
164
+ return json.dumps(data, indent=2)
165
+ except:
166
+ return response
167
+
168
+ def generate_feature_impact(feature: str, persona_name: str, persona_override: str):
169
+ """Generate a before/after feature impact story."""
170
+ _, persona_context = build_persona_profile(persona_name, persona_override)
171
+
172
+ system_prompt = """You are an expert at showing product impact through user narratives.
173
+ Generate a before/after story in JSON format with:
174
+ - before_story: How the persona struggled before
175
+ - after_story: How the feature improved their experience
176
+ - key_benefits: Array of 3-4 key benefits
177
+ - success_metrics: Array of 2-3 measurable success metrics
178
+
179
+ Return ONLY valid JSON, no additional text."""
180
+
181
+ user_prompt = f"""{persona_context}
182
+
183
+ Show the before/after impact of this feature on the persona's experience: {feature}
184
+
185
+ Format as JSON with keys: before_story, after_story, key_benefits (array), success_metrics (array)"""
186
+
187
+ response = generate_with_claude(system_prompt, user_prompt)
188
+ try:
189
+ data = json.loads(response)
190
+ return json.dumps(data, indent=2)
191
+ except:
192
+ return response
193
+
194
+ def generate_journey_story(stage: str, product: str, persona_name: str, persona_override: str):
195
+ """Generate a journey map narrative."""
196
+ _, persona_context = build_persona_profile(persona_name, persona_override)
197
+
198
+ system_prompt = """You are an expert in customer journey mapping and experience design.
199
+ Generate a journey stage narrative in JSON format with:
200
+ - stage: The journey stage name
201
+ - narrative: Detailed description of what the persona experiences
202
+ - touchpoints: Array of 3-4 key touchpoints
203
+ - emotions: Array of 2-3 emotions the persona experiences
204
+ - breakdowns: Array of 1-2 potential friction points
205
+ - opportunities: Array of 2-3 improvement opportunities
206
+
207
+ Return ONLY valid JSON, no additional text."""
208
+
209
+ user_prompt = f"""{persona_context}
210
+
211
+ Describe this persona's experience at the '{stage}' stage of their journey with {product}.
212
+
213
+ Format as JSON with keys: stage, narrative, touchpoints (array), emotions (array), breakdowns (array), opportunities (array)"""
214
+
215
+ response = generate_with_claude(system_prompt, user_prompt)
216
+ try:
217
+ data = json.loads(response)
218
+ return json.dumps(data, indent=2)
219
+ except:
220
+ return response
221
 
222
+ # Build the Gradio interface
223
+ with gr.Blocks(title="HealixPath - AI Persona Storytelling") as demo:
224
+ gr.Markdown("""
225
+ # 🌟 HealixPath - AI-Powered Persona Storytelling Engine
226
+
227
+ Transform product inputs, personas, and problems into rich, structured, realistic stories.
228
+
229
+ Instead of vague bullet points, HealixPath generates actionable narratives grounded in deep persona research.
230
+ """)
231
+
232
+ with gr.Tabs():
233
+ # Tab 1: User Story
234
+ with gr.Tab("User Story"):
235
+ gr.Markdown("### Generate Structured User Stories")
236
+ with gr.Row():
237
+ product = gr.Textbox(label="Product/Feature", placeholder="e.g., Healthcare appointment app")
238
+ with gr.Row():
239
+ persona_name = gr.Dropdown(
240
+ label="Select Persona",
241
+ choices=persona_choices,
242
+ value=default_persona_choice,
243
+ )
244
+ persona_custom = gr.Textbox(
245
+ label="Or Custom Persona",
246
+ placeholder="Describe your custom persona",
247
+ visible=False,
248
+ )
249
+ persona_name.change(
250
+ toggle_custom_persona, inputs=persona_name, outputs=persona_custom
251
+ )
252
+
253
+ user_story_btn = gr.Button("Generate User Story", scale=2)
254
+ user_story_output = gr.Textbox(label="Generated Story", lines=15, interactive=False)
255
+
256
+ user_story_btn.click(
257
+ generate_user_story,
258
+ inputs=[product, persona_name, persona_custom],
259
+ outputs=user_story_output
260
+ )
261
+
262
+ # Tab 2: Experience Tale
263
+ with gr.Tab("Experience Tale"):
264
+ gr.Markdown("### Generate Customer Experience Narratives")
265
+ with gr.Row():
266
+ problem = gr.Textbox(label="Problem", placeholder="e.g., Mobile app crashes during checkout")
267
+ with gr.Row():
268
+ persona_name_2 = gr.Dropdown(
269
+ label="Select Persona",
270
+ choices=persona_choices,
271
+ value=default_persona_choice,
272
+ )
273
+ persona_custom_2 = gr.Textbox(
274
+ label="Or Custom Persona",
275
+ placeholder="Describe your custom persona",
276
+ visible=False,
277
+ )
278
+ persona_name_2.change(
279
+ toggle_custom_persona,
280
+ inputs=persona_name_2,
281
+ outputs=persona_custom_2,
282
+ )
283
+
284
+ tale_btn = gr.Button("Generate Experience Tale", scale=2)
285
+ tale_output = gr.Textbox(label="Generated Tale", lines=15, interactive=False)
286
+
287
+ tale_btn.click(
288
+ generate_experience_tale,
289
+ inputs=[problem, persona_name_2, persona_custom_2],
290
+ outputs=tale_output
291
+ )
292
+
293
+ # Tab 3: Feature Impact
294
+ with gr.Tab("Feature Impact"):
295
+ gr.Markdown("### Generate Before/After Feature Impact Stories")
296
+ with gr.Row():
297
+ feature = gr.Textbox(label="Feature", placeholder="e.g., One-click scheduling with automatic reminders")
298
+ with gr.Row():
299
+ persona_name_3 = gr.Dropdown(
300
+ label="Select Persona",
301
+ choices=persona_choices,
302
+ value=default_persona_choice,
303
+ )
304
+ persona_custom_3 = gr.Textbox(
305
+ label="Or Custom Persona",
306
+ placeholder="Describe your custom persona",
307
+ visible=False,
308
+ )
309
+ persona_name_3.change(
310
+ toggle_custom_persona,
311
+ inputs=persona_name_3,
312
+ outputs=persona_custom_3,
313
+ )
314
+
315
+ impact_btn = gr.Button("Generate Feature Impact", scale=2)
316
+ impact_output = gr.Textbox(label="Generated Impact Story", lines=15, interactive=False)
317
+
318
+ impact_btn.click(
319
+ generate_feature_impact,
320
+ inputs=[feature, persona_name_3, persona_custom_3],
321
+ outputs=impact_output
322
+ )
323
+
324
+ # Tab 4: Journey Map
325
+ with gr.Tab("Journey Map"):
326
+ gr.Markdown("### Generate Journey Map Narratives")
327
+ with gr.Row():
328
+ stage = gr.Textbox(label="Journey Stage", placeholder="e.g., awareness, consideration, adoption, retention")
329
+ product_journey = gr.Textbox(label="Product", placeholder="e.g., Healthcare platform")
330
+ with gr.Row():
331
+ persona_name_4 = gr.Dropdown(
332
+ label="Select Persona",
333
+ choices=persona_choices,
334
+ value=default_persona_choice,
335
+ )
336
+ persona_custom_4 = gr.Textbox(
337
+ label="Or Custom Persona",
338
+ placeholder="Describe your custom persona",
339
+ visible=False,
340
+ )
341
+ persona_name_4.change(
342
+ toggle_custom_persona,
343
+ inputs=persona_name_4,
344
+ outputs=persona_custom_4,
345
+ )
346
+
347
+ journey_btn = gr.Button("Generate Journey Map", scale=2)
348
+ journey_output = gr.Textbox(label="Generated Journey Map", lines=15, interactive=False)
349
+
350
+ journey_btn.click(
351
+ generate_journey_story,
352
+ inputs=[stage, product_journey, persona_name_4, persona_custom_4],
353
+ outputs=journey_output
354
+ )
355
 
356
+ if __name__ == "__main__":
357
+ demo.launch()
data/personas.json ADDED
@@ -0,0 +1,1472 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "persona-001",
4
+ "name": "Alicia Ramirez",
5
+ "age": 34,
6
+ "gender": "Female",
7
+ "location": {
8
+ "address": "872 Palm Crest Ave",
9
+ "city": "San Diego",
10
+ "state": "CA",
11
+ "country": "USA"
12
+ },
13
+ "demographics": {
14
+ "income": "$95,000/year",
15
+ "education_level": "Bachelor's Degree in Marketing",
16
+ "marital_status": "Married",
17
+ "household_size": 3
18
+ },
19
+ "job": {
20
+ "title": "Senior Marketing Manager",
21
+ "industry": "E-commerce",
22
+ "experience_years": 10,
23
+ "employment_type": "Full-time"
24
+ },
25
+ "background": "Alicia manages digital marketing teams and coordinates multi-channel brand campaigns.",
26
+ "interests": ["online shopping", "home decor", "pilates", "productivity apps"],
27
+ "purchasing_habits": {
28
+ "online_shopping_frequency": "Weekly",
29
+ "preferred_platforms": ["Amazon", "Etsy", "Target"],
30
+ "average_spend_per_month": "$350",
31
+ "brand_loyalty_level": "High"
32
+ },
33
+ "technology": {
34
+ "tech_literacy": "High",
35
+ "devices_used": ["iPhone 15", "MacBook Pro"],
36
+ "favorite_apps": ["Notion", "Instagram", "Shopify"]
37
+ },
38
+ "goals": {
39
+ "primary_goals": ["Save time shopping", "Get curated product recommendations"],
40
+ "secondary_goals": ["Track expenses", "Stay informed on trends"]
41
+ },
42
+ "pain_points": ["Too many apps", "Hard to track household purchases"],
43
+ "motivations": ["Convenience", "Time savings"],
44
+ "personality": {
45
+ "traits": ["organized", "analytical"],
46
+ "communication_style": "Concise and visual"
47
+ },
48
+ "user_story": "As a busy professional, I want curated product recommendations so I can save time.",
49
+ "acceptance_criteria": ["AI filters products based on habits", "Shows savings and summaries"]
50
+ },
51
+ {
52
+ "id": "persona-002",
53
+ "name": "Marcus Chen",
54
+ "age": 28,
55
+ "gender": "Male",
56
+ "location": {
57
+ "address": "1440 Alder Street",
58
+ "city": "Portland",
59
+ "state": "OR",
60
+ "country": "USA"
61
+ },
62
+ "demographics": {
63
+ "income": "$72,000/year",
64
+ "education_level": "Bachelor's Degree in Computer Science",
65
+ "marital_status": "Single",
66
+ "household_size": 1
67
+ },
68
+ "job": {
69
+ "title": "Frontend Developer",
70
+ "industry": "Tech",
71
+ "experience_years": 5,
72
+ "employment_type": "Full-time"
73
+ },
74
+ "background": "Marcus builds web interfaces and experiments with AI tooling.",
75
+ "interests": ["gaming", "coding side-projects", "coffee brewing"],
76
+ "purchasing_habits": {
77
+ "online_shopping_frequency": "Monthly",
78
+ "preferred_platforms": ["Newegg", "Amazon"],
79
+ "average_spend_per_month": "$200",
80
+ "brand_loyalty_level": "Medium"
81
+ },
82
+ "technology": {
83
+ "tech_literacy": "Very High",
84
+ "devices_used": ["Custom PC", "Android phone"],
85
+ "favorite_apps": ["VSCode", "Discord", "Notion"]
86
+ },
87
+ "goals": {
88
+ "primary_goals": ["Find tools to boost productivity"],
89
+ "secondary_goals": ["Stay ahead of tech trends"]
90
+ },
91
+ "pain_points": ["Information overload", "Decision fatigue"],
92
+ "motivations": ["Efficiency", "Innovation"],
93
+ "personality": {
94
+ "traits": ["curious", "introverted"],
95
+ "communication_style": "Technical and detailed"
96
+ },
97
+ "user_story": "As a developer, I want clear product comparisons so I can choose tools faster.",
98
+ "acceptance_criteria": ["Side-by-side comparisons", "Technical breakdowns"]
99
+ },
100
+ {
101
+ "id": "persona-003",
102
+ "name": "Priya Kapoor",
103
+ "age": 42,
104
+ "gender": "Female",
105
+ "location": {
106
+ "address": "92 Hillcrest Road",
107
+ "city": "Toronto",
108
+ "state": "ON",
109
+ "country": "Canada"
110
+ },
111
+ "demographics": {
112
+ "income": "$130,000/year",
113
+ "education_level": "MBA",
114
+ "marital_status": "Married",
115
+ "household_size": 4
116
+ },
117
+ "job": {
118
+ "title": "Director of Operations",
119
+ "industry": "Healthcare",
120
+ "experience_years": 15,
121
+ "employment_type": "Full-time"
122
+ },
123
+ "background": "Priya oversees complex operational systems and values efficiency.",
124
+ "interests": ["yoga", "health tech", "travel"],
125
+ "purchasing_habits": {
126
+ "online_shopping_frequency": "Weekly",
127
+ "preferred_platforms": ["Well.ca", "Amazon"],
128
+ "average_spend_per_month": "$500",
129
+ "brand_loyalty_level": "High"
130
+ },
131
+ "technology": {
132
+ "tech_literacy": "Moderate",
133
+ "devices_used": ["iPhone", "Surface Pro"],
134
+ "favorite_apps": ["LinkedIn", "Google Calendar"]
135
+ },
136
+ "goals": {
137
+ "primary_goals": ["Simplify health management"],
138
+ "secondary_goals": ["Reduce stress"]
139
+ },
140
+ "pain_points": ["Complicated interfaces", "Time-consuming research"],
141
+ "motivations": ["Clarity", "Well-being"],
142
+ "personality": {
143
+ "traits": ["decisive", "strategic"],
144
+ "communication_style": "Professional and direct"
145
+ },
146
+ "user_story": "As a busy director, I want simple overviews so I can understand solutions quickly.",
147
+ "acceptance_criteria": ["Clear UI", "Concise summaries"]
148
+ },
149
+ {
150
+ "id": "persona-004",
151
+ "name": "Jamal Whitaker",
152
+ "age": 31,
153
+ "gender": "Male",
154
+ "location": {
155
+ "address": "555 Hamilton Street",
156
+ "city": "Atlanta",
157
+ "state": "GA",
158
+ "country": "USA"
159
+ },
160
+ "demographics": {
161
+ "income": "$58,000/year",
162
+ "education_level": "Associate Degree",
163
+ "marital_status": "Single",
164
+ "household_size": 2
165
+ },
166
+ "job": {
167
+ "title": "Customer Support Specialist",
168
+ "industry": "Fintech",
169
+ "experience_years": 6,
170
+ "employment_type": "Full-time"
171
+ },
172
+ "background": "Jamal assists users with payment and fintech tools.",
173
+ "interests": ["sneaker collecting", "hip-hop", "streaming"],
174
+ "purchasing_habits": {
175
+ "online_shopping_frequency": "Monthly",
176
+ "preferred_platforms": ["StockX", "Nike"],
177
+ "average_spend_per_month": "$250",
178
+ "brand_loyalty_level": "Medium"
179
+ },
180
+ "technology": {
181
+ "tech_literacy": "Moderate",
182
+ "devices_used": ["Android phone", "Xbox"],
183
+ "favorite_apps": ["TikTok", "Cash App"]
184
+ },
185
+ "goals": {
186
+ "primary_goals": ["Find good deals fast"],
187
+ "secondary_goals": ["Avoid scams"]
188
+ },
189
+ "pain_points": ["Slow websites", "Unclear pricing"],
190
+ "motivations": ["Value", "Authenticity"],
191
+ "personality": {
192
+ "traits": ["friendly", "practical"],
193
+ "communication_style": "Casual and simple"
194
+ },
195
+ "user_story": "As a collector, I want trustworthy deals so I don't waste time or money.",
196
+ "acceptance_criteria": ["Price verification", "Authenticity checks"]
197
+ },
198
+ {
199
+ "id": "persona-005",
200
+ "name": "Elena Petrova",
201
+ "age": 26,
202
+ "gender": "Female",
203
+ "location": {
204
+ "address": "22 Vasiliev Street",
205
+ "city": "Sofia",
206
+ "state": "Sofia",
207
+ "country": "Bulgaria"
208
+ },
209
+ "demographics": {
210
+ "income": "$32,000/year",
211
+ "education_level": "Bachelor's Degree in Design",
212
+ "marital_status": "Single",
213
+ "household_size": 1
214
+ },
215
+ "job": {
216
+ "title": "Freelance Graphic Designer",
217
+ "industry": "Creative",
218
+ "experience_years": 3,
219
+ "employment_type": "Freelance"
220
+ },
221
+ "background": "Elena designs branding for small businesses and creators.",
222
+ "interests": ["art", "photography", "travel blogs"],
223
+ "purchasing_habits": {
224
+ "online_shopping_frequency": "Weekly",
225
+ "preferred_platforms": ["Etsy", "Adobe Marketplace"],
226
+ "average_spend_per_month": "$120",
227
+ "brand_loyalty_level": "Low"
228
+ },
229
+ "technology": {
230
+ "tech_literacy": "High",
231
+ "devices_used": ["MacBook Air", "iPad Pro"],
232
+ "favorite_apps": ["Figma", "Pinterest", "Behance"]
233
+ },
234
+ "goals": {
235
+ "primary_goals": ["Find creative inspiration"],
236
+ "secondary_goals": ["Buy high-quality tools affordably"]
237
+ },
238
+ "pain_points": ["High software prices", "Subscription fatigue"],
239
+ "motivations": ["Creativity", "Affordability"],
240
+ "personality": {
241
+ "traits": ["imaginative", "independent"],
242
+ "communication_style": "Visual and expressive"
243
+ },
244
+ "user_story": "As a designer, I want affordable creative tools so I can expand my business.",
245
+ "acceptance_criteria": ["Clear pricing", "Tool recommendations"]
246
+ },
247
+ {
248
+ "id": "persona-006",
249
+ "name": "Derrick Simmons",
250
+ "age": 47,
251
+ "gender": "Male",
252
+ "location": {
253
+ "address": "901 Central Avenue",
254
+ "city": "Chicago",
255
+ "state": "IL",
256
+ "country": "USA"
257
+ },
258
+ "demographics": {
259
+ "income": "$110,000/year",
260
+ "education_level": "Bachelor's Degree",
261
+ "marital_status": "Divorced",
262
+ "household_size": 2
263
+ },
264
+ "job": {
265
+ "title": "Project Manager",
266
+ "industry": "Construction",
267
+ "experience_years": 20,
268
+ "employment_type": "Full-time"
269
+ },
270
+ "background": "Derrick oversees construction teams and workflow planning.",
271
+ "interests": ["DIY tools", "cars", "sports"],
272
+ "purchasing_habits": {
273
+ "online_shopping_frequency": "Bi-weekly",
274
+ "preferred_platforms": ["Home Depot", "Lowe's"],
275
+ "average_spend_per_month": "$400",
276
+ "brand_loyalty_level": "High"
277
+ },
278
+ "technology": {
279
+ "tech_literacy": "Low",
280
+ "devices_used": ["Samsung phone"],
281
+ "favorite_apps": ["YouTube", "Google Maps"]
282
+ },
283
+ "goals": {
284
+ "primary_goals": ["Find durable tools"],
285
+ "secondary_goals": ["Save time ordering materials"]
286
+ },
287
+ "pain_points": ["Complicated apps", "Product misinformation"],
288
+ "motivations": ["Reliability", "Quality"],
289
+ "personality": {
290
+ "traits": ["practical", "hardworking"],
291
+ "communication_style": "Straightforward"
292
+ },
293
+ "user_story": "As a project manager, I want reliable product info so I can avoid costly delays.",
294
+ "acceptance_criteria": ["Clear specs", "Trusted vendors"]
295
+ },
296
+ {
297
+ "id": "persona-007",
298
+ "name": "Sofia Alvarez",
299
+ "age": 22,
300
+ "gender": "Female",
301
+ "location": {
302
+ "address": "18 Calle Roja",
303
+ "city": "Madrid",
304
+ "state": "Madrid",
305
+ "country": "Spain"
306
+ },
307
+ "demographics": {
308
+ "income": "$18,000/year",
309
+ "education_level": "University Student",
310
+ "marital_status": "Single",
311
+ "household_size": 3
312
+ },
313
+ "job": {
314
+ "title": "Student",
315
+ "industry": "Education",
316
+ "experience_years": 1,
317
+ "employment_type": "Part-time"
318
+ },
319
+ "background": "Sofia studies psychology and works part-time at a café.",
320
+ "interests": ["fashion", "study apps", "social media"],
321
+ "purchasing_habits": {
322
+ "online_shopping_frequency": "Weekly",
323
+ "preferred_platforms": ["Zara", "Shein"],
324
+ "average_spend_per_month": "$80",
325
+ "brand_loyalty_level": "Low"
326
+ },
327
+ "technology": {
328
+ "tech_literacy": "High",
329
+ "devices_used": ["iPhone", "Laptop"],
330
+ "favorite_apps": ["TikTok", "Spotify", "Duolingo"]
331
+ },
332
+ "goals": {
333
+ "primary_goals": ["Stay organized for school"],
334
+ "secondary_goals": ["Find cheap stylish clothes"]
335
+ },
336
+ "pain_points": ["Budget limits", "Overwhelming choices"],
337
+ "motivations": ["Affordability", "Self-expression"],
338
+ "personality": {
339
+ "traits": ["energetic", "social"],
340
+ "communication_style": "Casual and emoji-heavy"
341
+ },
342
+ "user_story": "As a student, I want affordable recommendations so I can shop within my budget.",
343
+ "acceptance_criteria": ["Budget filters", "Style-based suggestions"]
344
+ },
345
+ {
346
+ "id": "persona-008",
347
+ "name": "Oliver Bennett",
348
+ "age": 55,
349
+ "gender": "Male",
350
+ "location": {
351
+ "address": "602 Brighton Lane",
352
+ "city": "London",
353
+ "state": "England",
354
+ "country": "UK"
355
+ },
356
+ "demographics": {
357
+ "income": "$150,000/year",
358
+ "education_level": "PhD in Economics",
359
+ "marital_status": "Married",
360
+ "household_size": 2
361
+ },
362
+ "job": {
363
+ "title": "Chief Financial Officer",
364
+ "industry": "Finance",
365
+ "experience_years": 25,
366
+ "employment_type": "Full-time"
367
+ },
368
+ "background": "Oliver manages financial strategy for a major fintech firm.",
369
+ "interests": ["golf", "history books", "fine dining"],
370
+ "purchasing_habits": {
371
+ "online_shopping_frequency": "Monthly",
372
+ "preferred_platforms": ["John Lewis", "Harrods"],
373
+ "average_spend_per_month": "$800",
374
+ "brand_loyalty_level": "Very High"
375
+ },
376
+ "technology": {
377
+ "tech_literacy": "Medium",
378
+ "devices_used": ["iPad", "iPhone"],
379
+ "favorite_apps": ["Financial Times", "Bloomberg"]
380
+ },
381
+ "goals": {
382
+ "primary_goals": ["Access accurate financial tools"],
383
+ "secondary_goals": ["Compare investment options"]
384
+ },
385
+ "pain_points": ["Complex UI", "Hidden fees"],
386
+ "motivations": ["Transparency", "Precision"],
387
+ "personality": {
388
+ "traits": ["analytical", "reserved"],
389
+ "communication_style": "Formal and data-driven"
390
+ },
391
+ "user_story": "As a CFO, I want transparent analytics so I can make informed decisions.",
392
+ "acceptance_criteria": ["Fee breakdowns", "Risk analysis"]
393
+ },
394
+ {
395
+ "id": "persona-009",
396
+ "name": "Hannah Schultz",
397
+ "age": 30,
398
+ "gender": "Female",
399
+ "location": {
400
+ "address": "11 Lindenstrasse",
401
+ "city": "Berlin",
402
+ "state": "Berlin",
403
+ "country": "Germany"
404
+ },
405
+ "demographics": {
406
+ "income": "$68,000/year",
407
+ "education_level": "Master's Degree",
408
+ "marital_status": "Engaged",
409
+ "household_size": 2
410
+ },
411
+ "job": {
412
+ "title": "UX Researcher",
413
+ "industry": "Tech",
414
+ "experience_years": 7,
415
+ "employment_type": "Full-time"
416
+ },
417
+ "background": "Hannah conducts user studies and usability tests.",
418
+ "interests": ["travel", "mindfulness", "cycling"],
419
+ "purchasing_habits": {
420
+ "online_shopping_frequency": "Bi-weekly",
421
+ "preferred_platforms": ["Zalando", "IKEA"],
422
+ "average_spend_per_month": "$150",
423
+ "brand_loyalty_level": "Medium"
424
+ },
425
+ "technology": {
426
+ "tech_literacy": "Very High",
427
+ "devices_used": ["MacBook Pro", "Pixel phone"],
428
+ "favorite_apps": ["Figma", "Miro", "Notion"]
429
+ },
430
+ "goals": {
431
+ "primary_goals": ["Improve personal productivity"],
432
+ "secondary_goals": ["Simplify travel planning"]
433
+ },
434
+ "pain_points": ["Cluttered UI", "Too many ads"],
435
+ "motivations": ["Usability", "Calm"],
436
+ "personality": {
437
+ "traits": ["empathetic", "observant"],
438
+ "communication_style": "Clear and human-centered"
439
+ },
440
+ "user_story": "As a UX researcher, I want intuitive tools so I can stay productive.",
441
+ "acceptance_criteria": ["Minimalist UI", "Reduced cognitive load"]
442
+ },
443
+ {
444
+ "id": "persona-010",
445
+ "name": "Daniel Oliveira",
446
+ "age": 37,
447
+ "gender": "Male",
448
+ "location": {
449
+ "address": "Rua Verde 212",
450
+ "city": "São Paulo",
451
+ "state": "SP",
452
+ "country": "Brazil"
453
+ },
454
+ "demographics": {
455
+ "income": "$40,000/year",
456
+ "education_level": "Bachelor's Degree",
457
+ "marital_status": "Married",
458
+ "household_size": 4
459
+ },
460
+ "job": {
461
+ "title": "Logistics Coordinator",
462
+ "industry": "Manufacturing",
463
+ "experience_years": 12,
464
+ "employment_type": "Full-time"
465
+ },
466
+ "background": "Daniel coordinates shipping and supply chain workflows.",
467
+ "interests": ["football", "barbecue", "mobile games"],
468
+ "purchasing_habits": {
469
+ "online_shopping_frequency": "Monthly",
470
+ "preferred_platforms": ["Mercado Livre"],
471
+ "average_spend_per_month": "$90",
472
+ "brand_loyalty_level": "Low"
473
+ },
474
+ "technology": {
475
+ "tech_literacy": "Medium",
476
+ "devices_used": ["Android phone"],
477
+ "favorite_apps": ["WhatsApp", "YouTube"]
478
+ },
479
+ "goals": {
480
+ "primary_goals": ["Save money"],
481
+ "secondary_goals": ["Find reliable local sellers"]
482
+ },
483
+ "pain_points": ["Slow delivery", "Price fluctuations"],
484
+ "motivations": ["Stability", "Good deals"],
485
+ "personality": {
486
+ "traits": ["practical", "family-oriented"],
487
+ "communication_style": "Simple and straightforward"
488
+ },
489
+ "user_story": "As a father, I want trustworthy affordable options so I can support my family.",
490
+ "acceptance_criteria": ["Low-cost recommendations", "Verified local sellers"]
491
+ },
492
+ {
493
+ "id": "persona-011",
494
+ "name": "Mei Tanaka",
495
+ "age": 29,
496
+ "gender": "Female",
497
+ "location": {
498
+ "address": "3-18 Sakura Lane",
499
+ "city": "Osaka",
500
+ "state": "Kansai",
501
+ "country": "Japan"
502
+ },
503
+ "demographics": {
504
+ "income": "$55,000/year",
505
+ "education_level": "Bachelor's Degree in Business",
506
+ "marital_status": "Single",
507
+ "household_size": 1
508
+ },
509
+ "job": {
510
+ "title": "Content Strategist",
511
+ "industry": "Media & Publishing",
512
+ "experience_years": 6,
513
+ "employment_type": "Full-time"
514
+ },
515
+ "background": "Mei creates online content strategies for lifestyle brands.",
516
+ "interests": ["photography", "indie fashion", "matcha cafes"],
517
+ "purchasing_habits": {
518
+ "online_shopping_frequency": "Weekly",
519
+ "preferred_platforms": ["Rakuten", "Uniqlo"],
520
+ "average_spend_per_month": "$180",
521
+ "brand_loyalty_level": "High"
522
+ },
523
+ "technology": {
524
+ "tech_literacy": "High",
525
+ "devices_used": ["iPhone", "MacBook Pro"],
526
+ "favorite_apps": ["LINE", "Instagram", "Notion"]
527
+ },
528
+ "goals": {
529
+ "primary_goals": ["Find new fashion inspirations"],
530
+ "secondary_goals": ["Manage work-life balance"]
531
+ },
532
+ "pain_points": ["Too many subscriptions", "Cluttered interfaces"],
533
+ "motivations": ["Aesthetics", "Simplicity"],
534
+ "personality": {
535
+ "traits": ["creative", "minimalist"],
536
+ "communication_style": "Short and visually oriented"
537
+ },
538
+ "user_story": "As a content strategist, I want aesthetic tools so I can create engaging visuals quickly.",
539
+ "acceptance_criteria": ["Clean visual UI", "Curated inspiration feed"]
540
+ },
541
+ {
542
+ "id": "persona-012",
543
+ "name": "Ethan Brooks",
544
+ "age": 40,
545
+ "gender": "Male",
546
+ "location": {
547
+ "address": "72 Greenview Road",
548
+ "city": "Denver",
549
+ "state": "CO",
550
+ "country": "USA"
551
+ },
552
+ "demographics": {
553
+ "income": "$85,000/year",
554
+ "education_level": "Bachelor's in Environmental Science",
555
+ "marital_status": "Married",
556
+ "household_size": 4
557
+ },
558
+ "job": {
559
+ "title": "Environmental Consultant",
560
+ "industry": "Sustainability",
561
+ "experience_years": 14,
562
+ "employment_type": "Full-time"
563
+ },
564
+ "background": "Ethan works with companies to reduce carbon footprints.",
565
+ "interests": ["hiking", "renewable energy", "electric vehicles"],
566
+ "purchasing_habits": {
567
+ "online_shopping_frequency": "Bi-weekly",
568
+ "preferred_platforms": ["REI", "Patagonia"],
569
+ "average_spend_per_month": "$250",
570
+ "brand_loyalty_level": "High"
571
+ },
572
+ "technology": {
573
+ "tech_literacy": "Medium",
574
+ "devices_used": ["iPhone", "Laptop"],
575
+ "favorite_apps": ["Strava", "Google Earth"]
576
+ },
577
+ "goals": {
578
+ "primary_goals": ["Adopt sustainable lifestyle products"],
579
+ "secondary_goals": ["Educate others about sustainability"]
580
+ },
581
+ "pain_points": ["Greenwashing", "Inconsistent product info"],
582
+ "motivations": ["Authenticity", "Environmental impact"],
583
+ "personality": {
584
+ "traits": ["ethical", "outdoorsy"],
585
+ "communication_style": "Friendly and educational"
586
+ },
587
+ "user_story": "As a sustainability expert, I want verified eco-friendly product recommendations.",
588
+ "acceptance_criteria": ["Eco-certifications", "Carbon footprint indicators"]
589
+ },
590
+ {
591
+ "id": "persona-013",
592
+ "name": "Fatima Al-Hassan",
593
+ "age": 33,
594
+ "gender": "Female",
595
+ "location": {
596
+ "address": "Villa 28 Palm District",
597
+ "city": "Dubai",
598
+ "state": "Dubai",
599
+ "country": "UAE"
600
+ },
601
+ "demographics": {
602
+ "income": "$120,000/year",
603
+ "education_level": "Master's Degree in Finance",
604
+ "marital_status": "Married",
605
+ "household_size": 5
606
+ },
607
+ "job": {
608
+ "title": "Investment Analyst",
609
+ "industry": "Finance",
610
+ "experience_years": 11,
611
+ "employment_type": "Full-time"
612
+ },
613
+ "background": "Fatima evaluates market trends and investment opportunities.",
614
+ "interests": ["luxury fashion", "crypto", "travel"],
615
+ "purchasing_habits": {
616
+ "online_shopping_frequency": "Weekly",
617
+ "preferred_platforms": ["Farfetch", "Bloomingdale's"],
618
+ "average_spend_per_month": "$1500",
619
+ "brand_loyalty_level": "Very High"
620
+ },
621
+ "technology": {
622
+ "tech_literacy": "High",
623
+ "devices_used": ["iPhone", "MacBook"],
624
+ "favorite_apps": ["Binance", "Bloomberg"]
625
+ },
626
+ "goals": {
627
+ "primary_goals": ["Grow her investment portfolio"],
628
+ "secondary_goals": ["Stay ahead of financial markets"]
629
+ },
630
+ "pain_points": ["Volatile markets", "Time-consuming research"],
631
+ "motivations": ["Wealth growth", "Prestige"],
632
+ "personality": {
633
+ "traits": ["confident", "strategic"],
634
+ "communication_style": "Formal and assertive"
635
+ },
636
+ "user_story": "As an investment analyst, I want concise financial insights so I can make decisions quickly.",
637
+ "acceptance_criteria": ["Real-time tracking", "Risk summaries"]
638
+ },
639
+ {
640
+ "id": "persona-014",
641
+ "name": "Carlos Mendes",
642
+ "age": 51,
643
+ "gender": "Male",
644
+ "location": {
645
+ "address": "Rua Das Flores 880",
646
+ "city": "Lisbon",
647
+ "state": "Lisbon",
648
+ "country": "Portugal"
649
+ },
650
+ "demographics": {
651
+ "income": "$60,000/year",
652
+ "education_level": "High School",
653
+ "marital_status": "Married",
654
+ "household_size": 3
655
+ },
656
+ "job": {
657
+ "title": "Taxi Driver",
658
+ "industry": "Transportation",
659
+ "experience_years": 25,
660
+ "employment_type": "Full-time"
661
+ },
662
+ "background": "Carlos drives tourists and locals around the city.",
663
+ "interests": ["football", "radio shows", "local cuisine"],
664
+ "purchasing_habits": {
665
+ "online_shopping_frequency": "Monthly",
666
+ "preferred_platforms": ["Amazon", "Fnac"],
667
+ "average_spend_per_month": "$60",
668
+ "brand_loyalty_level": "Low"
669
+ },
670
+ "technology": {
671
+ "tech_literacy": "Low",
672
+ "devices_used": ["Android phone"],
673
+ "favorite_apps": ["Google Maps", "WhatsApp"]
674
+ },
675
+ "goals": {
676
+ "primary_goals": ["Find reliable gear for his car"],
677
+ "secondary_goals": ["Save on expenses"]
678
+ },
679
+ "pain_points": ["Confusing apps", "Slow customer support"],
680
+ "motivations": ["Reliability", "Savings"],
681
+ "personality": {
682
+ "traits": ["patient", "down-to-earth"],
683
+ "communication_style": "Straightforward and practical"
684
+ },
685
+ "user_story": "As a driver, I want simple recommendations for car gear so I can maintain my vehicle easily.",
686
+ "acceptance_criteria": ["Clear product descriptions", "Trusted vendors"]
687
+ },
688
+ {
689
+ "id": "persona-015",
690
+ "name": "Nora Bergström",
691
+ "age": 24,
692
+ "gender": "Female",
693
+ "location": {
694
+ "address": "Skogsvägen 4",
695
+ "city": "Stockholm",
696
+ "state": "Stockholm",
697
+ "country": "Sweden"
698
+ },
699
+ "demographics": {
700
+ "income": "$45,000/year",
701
+ "education_level": "Bachelor's in Interaction Design",
702
+ "marital_status": "Single",
703
+ "household_size": 1
704
+ },
705
+ "job": {
706
+ "title": "Junior UI Designer",
707
+ "industry": "Tech",
708
+ "experience_years": 2,
709
+ "employment_type": "Full-time"
710
+ },
711
+ "background": "Nora designs user interfaces for mobile apps.",
712
+ "interests": ["minimalist decor", "coffee culture", "indie games"],
713
+ "purchasing_habits": {
714
+ "online_shopping_frequency": "Weekly",
715
+ "preferred_platforms": ["IKEA", "H&M"],
716
+ "average_spend_per_month": "$100",
717
+ "brand_loyalty_level": "Medium"
718
+ },
719
+ "technology": {
720
+ "tech_literacy": "Very High",
721
+ "devices_used": ["MacBook", "iPhone"],
722
+ "favorite_apps": ["Figma", "Spotify", "Slack"]
723
+ },
724
+ "goals": {
725
+ "primary_goals": ["Improve her design skills"],
726
+ "secondary_goals": ["Find stylish affordable furniture"]
727
+ },
728
+ "pain_points": ["Overcomplicated workflows", "Subscription creep"],
729
+ "motivations": ["Usability", "Aesthetics"],
730
+ "personality": {
731
+ "traits": ["analytical", "creative"],
732
+ "communication_style": "Clear and visual"
733
+ },
734
+ "user_story": "As a UI designer, I want sleek interfaces so I can stay productive and inspired.",
735
+ "acceptance_criteria": ["Minimalist UI", "Low cognitive load"]
736
+ },
737
+ {
738
+ "id": "persona-016",
739
+ "name": "James Holloway",
740
+ "age": 63,
741
+ "gender": "Male",
742
+ "location": {
743
+ "address": "45 Meadow Park",
744
+ "city": "Dublin",
745
+ "state": "Leinster",
746
+ "country": "Ireland"
747
+ },
748
+ "demographics": {
749
+ "income": "$70,000/year",
750
+ "education_level": "Bachelor's Degree",
751
+ "marital_status": "Widowed",
752
+ "household_size": 1
753
+ },
754
+ "job": {
755
+ "title": "Retired Airline Engineer",
756
+ "industry": "Aviation",
757
+ "experience_years": 35,
758
+ "employment_type": "Retired"
759
+ },
760
+ "background": "James previously maintained aircraft and now enjoys a quiet retired life.",
761
+ "interests": ["gardening", "aviation history", "woodworking"],
762
+ "purchasing_habits": {
763
+ "online_shopping_frequency": "Monthly",
764
+ "preferred_platforms": ["Amazon", "Gardener's Supply"],
765
+ "average_spend_per_month": "$90",
766
+ "brand_loyalty_level": "High"
767
+ },
768
+ "technology": {
769
+ "tech_literacy": "Low",
770
+ "devices_used": ["Tablet"],
771
+ "favorite_apps": ["YouTube", "Facebook"]
772
+ },
773
+ "goals": {
774
+ "primary_goals": ["Buy easy-to-use gardening tools"],
775
+ "secondary_goals": ["Learn new hobbies"]
776
+ },
777
+ "pain_points": ["Tech complexity", "Tiny text on apps"],
778
+ "motivations": ["Ease of use", "Comfort"],
779
+ "personality": {
780
+ "traits": ["patient", "curious"],
781
+ "communication_style": "Slow-paced and detailed"
782
+ },
783
+ "user_story": "As a retiree, I want simple guidance so I can shop for hobbies without confusion.",
784
+ "acceptance_criteria": ["Large text modes", "Clear tutorials"]
785
+ },
786
+ {
787
+ "id": "persona-017",
788
+ "name": "Lina Moretti",
789
+ "age": 48,
790
+ "gender": "Female",
791
+ "location": {
792
+ "address": "Via Della Pace 17",
793
+ "city": "Rome",
794
+ "state": "Lazio",
795
+ "country": "Italy"
796
+ },
797
+ "demographics": {
798
+ "income": "$82,000/year",
799
+ "education_level": "Master's Degree in Education",
800
+ "marital_status": "Divorced",
801
+ "household_size": 3
802
+ },
803
+ "job": {
804
+ "title": "School Administrator",
805
+ "industry": "Education",
806
+ "experience_years": 18,
807
+ "employment_type": "Full-time"
808
+ },
809
+ "background": "Lina manages school operations and student services.",
810
+ "interests": ["baking", "classical music", "museum visits"],
811
+ "purchasing_habits": {
812
+ "online_shopping_frequency": "Bi-weekly",
813
+ "preferred_platforms": ["Zalando", "Amazon"],
814
+ "average_spend_per_month": "$120",
815
+ "brand_loyalty_level": "Medium"
816
+ },
817
+ "technology": {
818
+ "tech_literacy": "Medium",
819
+ "devices_used": ["iPad", "iPhone"],
820
+ "favorite_apps": ["Kindle", "Google Classroom"]
821
+ },
822
+ "goals": {
823
+ "primary_goals": ["Find reliable organization tools"],
824
+ "secondary_goals": ["Balance work and home schedule"]
825
+ },
826
+ "pain_points": ["Too many notifications", "Hard-to-learn apps"],
827
+ "motivations": ["Stability", "Order"],
828
+ "personality": {
829
+ "traits": ["structured", "empathetic"],
830
+ "communication_style": "Warm and clear"
831
+ },
832
+ "user_story": "As an administrator, I want organized digital tools so I can manage my schedule easily.",
833
+ "acceptance_criteria": ["Calendar views", "Reminder system"]
834
+ },
835
+ {
836
+ "id": "persona-018",
837
+ "name": "Tariq Johnson",
838
+ "age": 19,
839
+ "gender": "Male",
840
+ "location": {
841
+ "address": "44 Pine Ridge Apartments",
842
+ "city": "Detroit",
843
+ "state": "MI",
844
+ "country": "USA"
845
+ },
846
+ "demographics": {
847
+ "income": "$12,000/year",
848
+ "education_level": "College Freshman",
849
+ "marital_status": "Single",
850
+ "household_size": 1
851
+ },
852
+ "job": {
853
+ "title": "Student / Part-time Retail",
854
+ "industry": "Retail",
855
+ "experience_years": 1,
856
+ "employment_type": "Part-time"
857
+ },
858
+ "background": "Tariq is studying computer graphics at a local college.",
859
+ "interests": ["gaming", "sneakers", "hip-hop"],
860
+ "purchasing_habits": {
861
+ "online_shopping_frequency": "Weekly",
862
+ "preferred_platforms": ["Nike", "StockX"],
863
+ "average_spend_per_month": "$70",
864
+ "brand_loyalty_level": "Low"
865
+ },
866
+ "technology": {
867
+ "tech_literacy": "High",
868
+ "devices_used": ["PS5", "Android"],
869
+ "favorite_apps": ["TikTok", "Snapchat"]
870
+ },
871
+ "goals": {
872
+ "primary_goals": ["Find good sneaker deals"],
873
+ "secondary_goals": ["Upgrade his gaming setup"]
874
+ },
875
+ "pain_points": ["Low budget", "Scalpers"],
876
+ "motivations": ["Style", "Status"],
877
+ "personality": {
878
+ "traits": ["energetic", "social"],
879
+ "communication_style": "Casual and slang-heavy"
880
+ },
881
+ "user_story": "As a student, I want affordable options so I can upgrade my gear without overspending.",
882
+ "acceptance_criteria": ["Budget suggestions", "Deal alerts"]
883
+ },
884
+ {
885
+ "id": "persona-019",
886
+ "name": "Helena Kowalski",
887
+ "age": 57,
888
+ "gender": "Female",
889
+ "location": {
890
+ "address": "84 Rynek Street",
891
+ "city": "Krakow",
892
+ "state": "Lesser Poland",
893
+ "country": "Poland"
894
+ },
895
+ "demographics": {
896
+ "income": "$50,000/year",
897
+ "education_level": "Bachelor's Degree",
898
+ "marital_status": "Married",
899
+ "household_size": 2
900
+ },
901
+ "job": {
902
+ "title": "Accountant",
903
+ "industry": "Finance",
904
+ "experience_years": 30,
905
+ "employment_type": "Full-time"
906
+ },
907
+ "background": "Helena manages financial records and audits.",
908
+ "interests": ["baking", "gardening", "local markets"],
909
+ "purchasing_habits": {
910
+ "online_shopping_frequency": "Monthly",
911
+ "preferred_platforms": ["Allegro", "Lidl Online"],
912
+ "average_spend_per_month": "$70",
913
+ "brand_loyalty_level": "High"
914
+ },
915
+ "technology": {
916
+ "tech_literacy": "Low",
917
+ "devices_used": ["Android phone"],
918
+ "favorite_apps": ["Facebook", "Banking apps"]
919
+ },
920
+ "goals": {
921
+ "primary_goals": ["Find reliable kitchen gear"],
922
+ "secondary_goals": ["Manage household finances easily"]
923
+ },
924
+ "pain_points": ["Hard-to-read interfaces", "Security concerns"],
925
+ "motivations": ["Trust", "Value"],
926
+ "personality": {
927
+ "traits": ["careful", "organized"],
928
+ "communication_style": "Detailed and cautious"
929
+ },
930
+ "user_story": "As an accountant, I want clear trustworthy product options so I can shop confidently.",
931
+ "acceptance_criteria": ["Verified reviews", "Security indicators"]
932
+ },
933
+ {
934
+ "id": "persona-020",
935
+ "name": "Samir Patel",
936
+ "age": 44,
937
+ "gender": "Male",
938
+ "location": {
939
+ "address": "10 Mango Grove",
940
+ "city": "Mumbai",
941
+ "state": "Maharashtra",
942
+ "country": "India"
943
+ },
944
+ "demographics": {
945
+ "income": "$25,000/year",
946
+ "education_level": "Associate Degree",
947
+ "marital_status": "Married",
948
+ "household_size": 5
949
+ },
950
+ "job": {
951
+ "title": "Small Business Owner",
952
+ "industry": "Retail",
953
+ "experience_years": 12,
954
+ "employment_type": "Self-employed"
955
+ },
956
+ "background": "Samir runs a local shop selling household goods.",
957
+ "interests": ["cricket", "budget tech", "street food"],
958
+ "purchasing_habits": {
959
+ "online_shopping_frequency": "Bi-weekly",
960
+ "preferred_platforms": ["Flipkart", "Amazon India"],
961
+ "average_spend_per_month": "$50",
962
+ "brand_loyalty_level": "Low"
963
+ },
964
+ "technology": {
965
+ "tech_literacy": "Medium",
966
+ "devices_used": ["Android phone"],
967
+ "favorite_apps": ["WhatsApp", "Paytm"]
968
+ },
969
+ "goals": {
970
+ "primary_goals": ["Buy affordable inventory"],
971
+ "secondary_goals": ["Save money for his family"]
972
+ },
973
+ "pain_points": ["Fake listings", "Price jumps"],
974
+ "motivations": ["Savings", "Trust"],
975
+ "personality": {
976
+ "traits": ["resourceful", "practical"],
977
+ "communication_style": "Direct and to the point"
978
+ },
979
+ "user_story": "As a shop owner, I want budget-friendly verified items so I can grow my business safely.",
980
+ "acceptance_criteria": ["Verified sellers", "Stable pricing"]
981
+ },
982
+ {
983
+ "id": "persona-021",
984
+ "name": "Amina Yusuf",
985
+ "age": 36,
986
+ "gender": "Female",
987
+ "location": {
988
+ "address": "45 Crescent Gardens",
989
+ "city": "Manchester",
990
+ "state": "England",
991
+ "country": "UK"
992
+ },
993
+ "demographics": {
994
+ "income": "$52,000/year",
995
+ "education_level": "Master's Degree in Social Work",
996
+ "marital_status": "Married",
997
+ "household_size": 4
998
+ },
999
+ "job": {
1000
+ "title": "Social Worker",
1001
+ "industry": "Public Services",
1002
+ "experience_years": 12,
1003
+ "employment_type": "Full-time"
1004
+ },
1005
+ "background": "Amina supports families and individuals through community programs.",
1006
+ "interests": ["community volunteering", "baking", "reading"],
1007
+ "purchasing_habits": {
1008
+ "online_shopping_frequency": "Bi-weekly",
1009
+ "preferred_platforms": ["Tesco", "ASOS"],
1010
+ "average_spend_per_month": "$140",
1011
+ "brand_loyalty_level": "Medium"
1012
+ },
1013
+ "technology": {
1014
+ "tech_literacy": "Medium",
1015
+ "devices_used": ["Samsung Phone", "Work Laptop"],
1016
+ "favorite_apps": ["WhatsApp", "Kindle"]
1017
+ },
1018
+ "goals": {
1019
+ "primary_goals": ["Support her family efficiently"],
1020
+ "secondary_goals": ["Reduce stress in daily life"]
1021
+ },
1022
+ "pain_points": ["Expensive groceries", "Information overload"],
1023
+ "motivations": ["Reliability", "Affordability"],
1024
+ "personality": {
1025
+ "traits": ["empathetic", "calm"],
1026
+ "communication_style": "Warm and conversational"
1027
+ },
1028
+ "user_story": "As a social worker and mother, I want cost-effective recommendations so I can stay within budget.",
1029
+ "acceptance_criteria": ["Budget shopping suggestions", "Price comparison tools"]
1030
+ },
1031
+ {
1032
+ "id": "persona-022",
1033
+ "name": "Logan Price",
1034
+ "age": 27,
1035
+ "gender": "Male",
1036
+ "location": {
1037
+ "address": "1280 North Ridge",
1038
+ "city": "Seattle",
1039
+ "state": "WA",
1040
+ "country": "USA"
1041
+ },
1042
+ "demographics": {
1043
+ "income": "$98,000/year",
1044
+ "education_level": "Bachelor's in Computer Engineering",
1045
+ "marital_status": "Engaged",
1046
+ "household_size": 2
1047
+ },
1048
+ "job": {
1049
+ "title": "Machine Learning Engineer",
1050
+ "industry": "Tech / AI",
1051
+ "experience_years": 5,
1052
+ "employment_type": "Full-time"
1053
+ },
1054
+ "background": "Logan builds models for consumer-facing AI products.",
1055
+ "interests": ["robotics", "mountain biking", "3D printing"],
1056
+ "purchasing_habits": {
1057
+ "online_shopping_frequency": "Weekly",
1058
+ "preferred_platforms": ["Newegg", "Amazon"],
1059
+ "average_spend_per_month": "$500",
1060
+ "brand_loyalty_level": "Low"
1061
+ },
1062
+ "technology": {
1063
+ "tech_literacy": "Very High",
1064
+ "devices_used": ["Custom PC", "Pixel Phone"],
1065
+ "favorite_apps": ["GitHub", "Hugging Face", "Reddit"]
1066
+ },
1067
+ "goals": {
1068
+ "primary_goals": ["Optimize workflows"],
1069
+ "secondary_goals": ["Experiment with new hardware"]
1070
+ },
1071
+ "pain_points": ["Hard-to-find reviews", "Unclear benchmarks"],
1072
+ "motivations": ["Efficiency", "Innovation"],
1073
+ "personality": {
1074
+ "traits": ["logical", "curious"],
1075
+ "communication_style": "Technical and brief"
1076
+ },
1077
+ "user_story": "As an ML engineer, I want technical product comparisons so I can pick hardware quickly.",
1078
+ "acceptance_criteria": ["Benchmark charts", "Feature comparison tables"]
1079
+ },
1080
+ {
1081
+ "id": "persona-023",
1082
+ "name": "Rosa Delgado",
1083
+ "age": 54,
1084
+ "gender": "Female",
1085
+ "location": {
1086
+ "address": "18 Camino Verde",
1087
+ "city": "Monterrey",
1088
+ "state": "Nuevo León",
1089
+ "country": "Mexico"
1090
+ },
1091
+ "demographics": {
1092
+ "income": "$42,000/year",
1093
+ "education_level": "High School Diploma",
1094
+ "marital_status": "Married",
1095
+ "household_size": 5
1096
+ },
1097
+ "job": {
1098
+ "title": "Restaurant Manager",
1099
+ "industry": "Food Service",
1100
+ "experience_years": 25,
1101
+ "employment_type": "Full-time"
1102
+ },
1103
+ "background": "Rosa manages staff, inventory, and customer service operations.",
1104
+ "interests": ["cooking shows", "family outings", "local festivals"],
1105
+ "purchasing_habits": {
1106
+ "online_shopping_frequency": "Every 2 weeks",
1107
+ "preferred_platforms": ["Mercado Libre"],
1108
+ "average_spend_per_month": "$120",
1109
+ "brand_loyalty_level": "High"
1110
+ },
1111
+ "technology": {
1112
+ "tech_literacy": "Medium",
1113
+ "devices_used": ["Android Phone"],
1114
+ "favorite_apps": ["Facebook", "YouTube"]
1115
+ },
1116
+ "goals": {
1117
+ "primary_goals": ["Keep restaurant equipment updated"],
1118
+ "secondary_goals": ["Support family needs affordably"]
1119
+ },
1120
+ "pain_points": ["Long delivery times", "Fake equipment listings"],
1121
+ "motivations": ["Reliability", "Fair pricing"],
1122
+ "personality": {
1123
+ "traits": ["responsible", "detail-oriented"],
1124
+ "communication_style": "Direct and polite"
1125
+ },
1126
+ "user_story": "As a restaurant manager, I want reliable supplier recommendations so I can avoid bad purchases.",
1127
+ "acceptance_criteria": ["Verified seller tags", "Fast shipping indicators"]
1128
+ },
1129
+ {
1130
+ "id": "persona-024",
1131
+ "name": "Iris Nguyen",
1132
+ "age": 23,
1133
+ "gender": "Female",
1134
+ "location": {
1135
+ "address": "222 Orchid Street",
1136
+ "city": "Ho Chi Minh City",
1137
+ "state": "HCMC",
1138
+ "country": "Vietnam"
1139
+ },
1140
+ "demographics": {
1141
+ "income": "$15,000/year",
1142
+ "education_level": "University Graduate",
1143
+ "marital_status": "Single",
1144
+ "household_size": 3
1145
+ },
1146
+ "job": {
1147
+ "title": "Digital Illustrator",
1148
+ "industry": "Creative Arts",
1149
+ "experience_years": 2,
1150
+ "employment_type": "Freelance"
1151
+ },
1152
+ "background": "Iris creates character art for mobile games and indie teams.",
1153
+ "interests": ["anime", "digital art tools", "mobile RPGs"],
1154
+ "purchasing_habits": {
1155
+ "online_shopping_frequency": "Weekly",
1156
+ "preferred_platforms": ["Shopee", "ArtStation Market"],
1157
+ "average_spend_per_month": "$60",
1158
+ "brand_loyalty_level": "Low"
1159
+ },
1160
+ "technology": {
1161
+ "tech_literacy": "High",
1162
+ "devices_used": ["iPad Pro", "Laptop"],
1163
+ "favorite_apps": ["Procreate", "Clip Studio Paint", "Twitter"]
1164
+ },
1165
+ "goals": {
1166
+ "primary_goals": ["Buy affordable brushes and tools"],
1167
+ "secondary_goals": ["Grow her freelance brand"]
1168
+ },
1169
+ "pain_points": ["Subscription fatigue", "Limited budget"],
1170
+ "motivations": ["Creativity", "Affordability"],
1171
+ "personality": {
1172
+ "traits": ["imaginative", "introverted"],
1173
+ "communication_style": "Casual and expressive"
1174
+ },
1175
+ "user_story": "As an illustrator, I want budget-friendly professional tools so I can improve my art.",
1176
+ "acceptance_criteria": ["Low-cost bundles", "Quality reviews"]
1177
+ },
1178
+ {
1179
+ "id": "persona-025",
1180
+ "name": "Gabriel Johansson",
1181
+ "age": 39,
1182
+ "gender": "Male",
1183
+ "location": {
1184
+ "address": "14 Fjordvägen",
1185
+ "city": "Bergen",
1186
+ "state": "Vestland",
1187
+ "country": "Norway"
1188
+ },
1189
+ "demographics": {
1190
+ "income": "$90,000/year",
1191
+ "education_level": "PhD in Marine Biology",
1192
+ "marital_status": "Married",
1193
+ "household_size": 4
1194
+ },
1195
+ "job": {
1196
+ "title": "Research Scientist",
1197
+ "industry": "Environmental Research",
1198
+ "experience_years": 14,
1199
+ "employment_type": "Full-time"
1200
+ },
1201
+ "background": "Gabriel studies ocean ecosystems and publishes academic work.",
1202
+ "interests": ["sailing", "wildlife photography", "data visualization"],
1203
+ "purchasing_habits": {
1204
+ "online_shopping_frequency": "Monthly",
1205
+ "preferred_platforms": ["Specialty science suppliers"],
1206
+ "average_spend_per_month": "$400",
1207
+ "brand_loyalty_level": "High"
1208
+ },
1209
+ "technology": {
1210
+ "tech_literacy": "Very High",
1211
+ "devices_used": ["MacBook", "DSLR camera"],
1212
+ "favorite_apps": ["MATLAB", "RStudio"]
1213
+ },
1214
+ "goals": {
1215
+ "primary_goals": ["Find reliable scientific instruments"],
1216
+ "secondary_goals": ["Improve research efficiency"]
1217
+ },
1218
+ "pain_points": ["High equipment prices", "Long procurement times"],
1219
+ "motivations": ["Accuracy", "Scientific integrity"],
1220
+ "personality": {
1221
+ "traits": ["methodical", "analytical"],
1222
+ "communication_style": "Formal and precise"
1223
+ },
1224
+ "user_story": "As a marine biologist, I want accurate equipment recommendations so I can conduct research effectively.",
1225
+ "acceptance_criteria": ["Technical specifications", "Peer-reviewed rating system"]
1226
+ },
1227
+ {
1228
+ "id": "persona-026",
1229
+ "name": "Bianca Rossi",
1230
+ "age": 31,
1231
+ "gender": "Female",
1232
+ "location": {
1233
+ "address": "Via Luna 88",
1234
+ "city": "Florence",
1235
+ "state": "Tuscany",
1236
+ "country": "Italy"
1237
+ },
1238
+ "demographics": {
1239
+ "income": "$65,000/year",
1240
+ "education_level": "Master's in Fashion Design",
1241
+ "marital_status": "Single",
1242
+ "household_size": 1
1243
+ },
1244
+ "job": {
1245
+ "title": "Fashion Designer",
1246
+ "industry": "Fashion",
1247
+ "experience_years": 7,
1248
+ "employment_type": "Full-time"
1249
+ },
1250
+ "background": "Bianca designs boutique clothing and maintains an Instagram brand.",
1251
+ "interests": ["handmade fashion", "fabric sourcing", "travel"],
1252
+ "purchasing_habits": {
1253
+ "online_shopping_frequency": "Weekly",
1254
+ "preferred_platforms": ["Etsy", "Fabric.com"],
1255
+ "average_spend_per_month": "$600",
1256
+ "brand_loyalty_level": "Very High"
1257
+ },
1258
+ "technology": {
1259
+ "tech_literacy": "Medium",
1260
+ "devices_used": ["iPhone", "MacBook"],
1261
+ "favorite_apps": ["Instagram", "Canva"]
1262
+ },
1263
+ "goals": {
1264
+ "primary_goals": ["Find unique high-quality materials"],
1265
+ "secondary_goals": ["Grow her online presence"]
1266
+ },
1267
+ "pain_points": ["Unreliable suppliers", "High shipping costs"],
1268
+ "motivations": ["Quality", "Creativity"],
1269
+ "personality": {
1270
+ "traits": ["artistic", "ambitious"],
1271
+ "communication_style": "Casual but expressive"
1272
+ },
1273
+ "user_story": "As a designer, I want trustworthy unique materials so I can create standout clothing.",
1274
+ "acceptance_criteria": ["Supplier ratings", "Material authenticity indicators"]
1275
+ },
1276
+ {
1277
+ "id": "persona-027",
1278
+ "name": "Owen Clarke",
1279
+ "age": 47,
1280
+ "gender": "Male",
1281
+ "location": {
1282
+ "address": "Millstone Road 55",
1283
+ "city": "Auckland",
1284
+ "state": "North Island",
1285
+ "country": "New Zealand"
1286
+ },
1287
+ "demographics": {
1288
+ "income": "$78,000/year",
1289
+ "education_level": "Bachelor's Degree",
1290
+ "marital_status": "Married",
1291
+ "household_size": 5
1292
+ },
1293
+ "job": {
1294
+ "title": "IT Support Lead",
1295
+ "industry": "IT Services",
1296
+ "experience_years": 20,
1297
+ "employment_type": "Full-time"
1298
+ },
1299
+ "background": "Owen manages a helpdesk team and troubleshooting workflows.",
1300
+ "interests": ["barbecue", "rugby", "family road trips"],
1301
+ "purchasing_habits": {
1302
+ "online_shopping_frequency": "Bi-weekly",
1303
+ "preferred_platforms": ["PBTech", "The Warehouse"],
1304
+ "average_spend_per_month": "$200",
1305
+ "brand_loyalty_level": "Medium"
1306
+ },
1307
+ "technology": {
1308
+ "tech_literacy": "High",
1309
+ "devices_used": ["Work Laptop", "Android Phone"],
1310
+ "favorite_apps": ["Slack", "Gmail"]
1311
+ },
1312
+ "goals": {
1313
+ "primary_goals": ["Find reliable tech tools"],
1314
+ "secondary_goals": ["Support his team's productivity"]
1315
+ },
1316
+ "pain_points": ["Outdated device listings", "Slow documentation"],
1317
+ "motivations": ["Reliability", "Efficiency"],
1318
+ "personality": {
1319
+ "traits": ["organized", "helpful"],
1320
+ "communication_style": "Clear and instructional"
1321
+ },
1322
+ "user_story": "As an IT lead, I want reliable tool recommendations so I can equip my team properly.",
1323
+ "acceptance_criteria": ["Device compatibility info", "Model-year filters"]
1324
+ },
1325
+ {
1326
+ "id": "persona-028",
1327
+ "name": "Chloe Harris",
1328
+ "age": 18,
1329
+ "gender": "Female",
1330
+ "location": {
1331
+ "address": "Summerfield Drive 12",
1332
+ "city": "Sydney",
1333
+ "state": "NSW",
1334
+ "country": "Australia"
1335
+ },
1336
+ "demographics": {
1337
+ "income": "$8,000/year",
1338
+ "education_level": "High School Graduate",
1339
+ "marital_status": "Single",
1340
+ "household_size": 4
1341
+ },
1342
+ "job": {
1343
+ "title": "Gap Year Student",
1344
+ "industry": "N/A",
1345
+ "experience_years": 0,
1346
+ "employment_type": "Part-time"
1347
+ },
1348
+ "background": "Chloe is taking a gap year before university and exploring interests.",
1349
+ "interests": ["makeup", "K-pop", "travel vlogs"],
1350
+ "purchasing_habits": {
1351
+ "online_shopping_frequency": "Weekly",
1352
+ "preferred_platforms": ["Sephora", "Shein"],
1353
+ "average_spend_per_month": "$60",
1354
+ "brand_loyalty_level": "Low"
1355
+ },
1356
+ "technology": {
1357
+ "tech_literacy": "High",
1358
+ "devices_used": ["iPhone", "Laptop"],
1359
+ "favorite_apps": ["TikTok", "Instagram", "Spotify"]
1360
+ },
1361
+ "goals": {
1362
+ "primary_goals": ["Try new fashion styles"],
1363
+ "secondary_goals": ["Save money for travel"]
1364
+ },
1365
+ "pain_points": ["Small budget", "Inconsistent quality"],
1366
+ "motivations": ["Self-expression", "Affordability"],
1367
+ "personality": {
1368
+ "traits": ["bubbly", "exploratory"],
1369
+ "communication_style": "Casual, lively, emoji-heavy"
1370
+ },
1371
+ "user_story": "As a student, I want affordable trendy options so I can explore new styles.",
1372
+ "acceptance_criteria": ["Budget filters", "Quality assurance tags"]
1373
+ },
1374
+ {
1375
+ "id": "persona-029",
1376
+ "name": "Victor Santos",
1377
+ "age": 33,
1378
+ "gender": "Male",
1379
+ "location": {
1380
+ "address": "Rua Da Esperança 12",
1381
+ "city": "Rio de Janeiro",
1382
+ "state": "RJ",
1383
+ "country": "Brazil"
1384
+ },
1385
+ "demographics": {
1386
+ "income": "$48,000/year",
1387
+ "education_level": "Bachelor's Degree in Marketing",
1388
+ "marital_status": "Single",
1389
+ "household_size": 2
1390
+ },
1391
+ "job": {
1392
+ "title": "Video Editor",
1393
+ "industry": "Media Production",
1394
+ "experience_years": 8,
1395
+ "employment_type": "Full-time"
1396
+ },
1397
+ "background": "Victor edits videos for ad agencies and YouTube clients.",
1398
+ "interests": ["cinematography", "drones", "gaming"],
1399
+ "purchasing_habits": {
1400
+ "online_shopping_frequency": "Weekly",
1401
+ "preferred_platforms": ["B&H", "Mercado Livre"],
1402
+ "average_spend_per_month": "$350",
1403
+ "brand_loyalty_level": "Medium"
1404
+ },
1405
+ "technology": {
1406
+ "tech_literacy": "Very High",
1407
+ "devices_used": ["4K workstation", "DJI drone"],
1408
+ "favorite_apps": ["Premiere Pro", "DaVinci Resolve"]
1409
+ },
1410
+ "goals": {
1411
+ "primary_goals": ["Upgrade editing tools"],
1412
+ "secondary_goals": ["Improve workflow speed"]
1413
+ },
1414
+ "pain_points": ["High gear prices", "Fake accessory listings"],
1415
+ "motivations": ["Quality", "Performance"],
1416
+ "personality": {
1417
+ "traits": ["creative", "focused"],
1418
+ "communication_style": "Direct and technical"
1419
+ },
1420
+ "user_story": "As a video editor, I want accurate gear reviews so I can invest wisely.",
1421
+ "acceptance_criteria": ["Accessory authenticity markers", "Video performance benchmarks"]
1422
+ },
1423
+ {
1424
+ "id": "persona-030",
1425
+ "name": "Harper Lewis",
1426
+ "age": 41,
1427
+ "gender": "Nonbinary",
1428
+ "location": {
1429
+ "address": "91 Willow Terrace",
1430
+ "city": "Vancouver",
1431
+ "state": "BC",
1432
+ "country": "Canada"
1433
+ },
1434
+ "demographics": {
1435
+ "income": "$75,000/year",
1436
+ "education_level": "Master's Degree",
1437
+ "marital_status": "In a partnership",
1438
+ "household_size": 2
1439
+ },
1440
+ "job": {
1441
+ "title": "Therapist",
1442
+ "industry": "Mental Health",
1443
+ "experience_years": 10,
1444
+ "employment_type": "Full-time"
1445
+ },
1446
+ "background": "Harper provides therapy for young adults, focusing on anxiety and trauma.",
1447
+ "interests": ["meditation", "painting", "hiking"],
1448
+ "purchasing_habits": {
1449
+ "online_shopping_frequency": "Monthly",
1450
+ "preferred_platforms": ["Indigo", "REI"],
1451
+ "average_spend_per_month": "$120",
1452
+ "brand_loyalty_level": "Medium"
1453
+ },
1454
+ "technology": {
1455
+ "tech_literacy": "Medium",
1456
+ "devices_used": ["iPad", "Phone"],
1457
+ "favorite_apps": ["Calm", "Google Calendar"]
1458
+ },
1459
+ "goals": {
1460
+ "primary_goals": ["Find calming wellness products"],
1461
+ "secondary_goals": ["Simplify life organization"]
1462
+ },
1463
+ "pain_points": ["Overwhelming choices", "Cluttered marketplaces"],
1464
+ "motivations": ["Peace", "Confidence"],
1465
+ "personality": {
1466
+ "traits": ["empathetic", "reflective"],
1467
+ "communication_style": "Soft, clear, supportive"
1468
+ },
1469
+ "user_story": "As a therapist, I want calm-oriented product suggestions so I can recommend them to clients.",
1470
+ "acceptance_criteria": ["Emotion-based categories", "Trusted wellness suppliers"]
1471
+ }
1472
+ ]
mcp.config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "mcpServers": {
3
+ "healixpath": {
4
+ "command": "node",
5
+ "args": ["/path/to/healixpath/dist/index.js"],
6
+ "env": {
7
+ "NODE_ENV": "production",
8
+ "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}"
9
+ }
10
+ }
11
+ }
12
+ }
package-lock.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "healixpath",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "healixpath",
9
+ "version": "1.0.0",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "@anthropic-ai/sdk": "^0.70.0",
13
+ "dotenv": "^16.4.7"
14
+ },
15
+ "devDependencies": {
16
+ "@types/node": "^20.10.0",
17
+ "typescript": "^5.3.3"
18
+ }
19
+ },
20
+ "node_modules/@anthropic-ai/sdk": {
21
+ "version": "0.70.1",
22
+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.70.1.tgz",
23
+ "integrity": "sha512-AGEhifuvE22VxfQ5ROxViTgM8NuVQzEvqcN8bttR4AP24ythmNE/cL/SrOz79xiv7/osrsmCyErjsistJi7Z8A==",
24
+ "dependencies": {
25
+ "json-schema-to-ts": "^3.1.1"
26
+ },
27
+ "bin": {
28
+ "anthropic-ai-sdk": "bin/cli"
29
+ },
30
+ "peerDependencies": {
31
+ "zod": "^3.25.0 || ^4.0.0"
32
+ },
33
+ "peerDependenciesMeta": {
34
+ "zod": {
35
+ "optional": true
36
+ }
37
+ }
38
+ },
39
+ "node_modules/@babel/runtime": {
40
+ "version": "7.28.4",
41
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
42
+ "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
43
+ "engines": {
44
+ "node": ">=6.9.0"
45
+ }
46
+ },
47
+ "node_modules/@types/node": {
48
+ "version": "20.19.25",
49
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz",
50
+ "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==",
51
+ "dev": true,
52
+ "dependencies": {
53
+ "undici-types": "~6.21.0"
54
+ }
55
+ },
56
+ "node_modules/dotenv": {
57
+ "version": "16.6.1",
58
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
59
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
60
+ "engines": {
61
+ "node": ">=12"
62
+ },
63
+ "funding": {
64
+ "url": "https://dotenvx.com"
65
+ }
66
+ },
67
+ "node_modules/json-schema-to-ts": {
68
+ "version": "3.1.1",
69
+ "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz",
70
+ "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==",
71
+ "dependencies": {
72
+ "@babel/runtime": "^7.18.3",
73
+ "ts-algebra": "^2.0.0"
74
+ },
75
+ "engines": {
76
+ "node": ">=16"
77
+ }
78
+ },
79
+ "node_modules/ts-algebra": {
80
+ "version": "2.0.0",
81
+ "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz",
82
+ "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw=="
83
+ },
84
+ "node_modules/typescript": {
85
+ "version": "5.9.3",
86
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
87
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
88
+ "dev": true,
89
+ "bin": {
90
+ "tsc": "bin/tsc",
91
+ "tsserver": "bin/tsserver"
92
+ },
93
+ "engines": {
94
+ "node": ">=14.17"
95
+ }
96
+ },
97
+ "node_modules/undici-types": {
98
+ "version": "6.21.0",
99
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
100
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
101
+ "dev": true
102
+ }
103
+ }
104
+ }
package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "healixpath",
3
+ "version": "1.0.0",
4
+ "description": "AI-powered persona storytelling engine for UX, product, and design teams",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "start": "node dist/index.js",
10
+ "dev": "tsc && node dist/index.js",
11
+ "watch": "tsc --watch"
12
+ },
13
+ "keywords": [
14
+ "mcp",
15
+ "personas",
16
+ "storytelling",
17
+ "ux",
18
+ "product",
19
+ "healthcare",
20
+ "ai"
21
+ ],
22
+ "author": "HealixPath Team",
23
+ "license": "MIT",
24
+ "dependencies": {
25
+ "@anthropic-ai/sdk": "^0.70.0",
26
+ "dotenv": "^16.4.7"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^20.10.0",
30
+ "typescript": "^5.3.3"
31
+ }
32
+ }
requirements.txt CHANGED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ gradio==5.49.1
2
+ anthropic>=0.24.0
3
+ pydantic>=2.0.0
4
+ python-dotenv>=1.0.0
setup-wsl.sh ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # HealixPath WSL Setup Helper
3
+
4
+ echo "🚀 HealixPath WSL Environment Setup"
5
+ echo "===================================="
6
+
7
+ # Activate Python virtual environment
8
+ echo "Activating Python virtual environment..."
9
+ source /mnt/c/Users/rarev/Code/TeamHealix/venv/bin/activate
10
+
11
+ # Check Node and Python
12
+ echo ""
13
+ echo "✅ Environment Ready:"
14
+ echo " Node.js: $(node --version)"
15
+ echo " npm: $(npm --version)"
16
+ echo " Python: $(python3 --version)"
17
+ echo ""
18
+
19
+ # Show available commands
20
+ echo "📝 Available Commands:"
21
+ echo ""
22
+ echo " npm run build - Build TypeScript to JavaScript"
23
+ echo " npm run start - Run MCP Server"
24
+ echo " python app.py - Run Gradio Web Interface"
25
+ echo ""
26
+ echo "🌐 Web Interface: http://localhost:7860"
27
+ echo "📡 MCP Server: Runs on configurable port"
28
+ echo ""
src/index.ts ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import "dotenv/config";
2
+ import {
3
+ loadPersonas,
4
+ getPersona,
5
+ type Persona,
6
+ } from "./utils/persona_loader.js";
7
+ import { generateUserStory, type UserStoryInput } from "./tools/user_story.js";
8
+ import {
9
+ generateCustomerExperienceTale,
10
+ type CustomerExperienceTaleInput,
11
+ } from "./tools/customer_experience_tale.js";
12
+ import {
13
+ generateFeatureImpactStory,
14
+ type FeatureImpactStoryInput,
15
+ } from "./tools/feature_impact_story.js";
16
+ import {
17
+ generateJourneyMapStory,
18
+ type JourneyMapStoryInput,
19
+ } from "./tools/journey_map_story.js";
20
+
21
+ interface ToolSchema {
22
+ name: string;
23
+ description: string;
24
+ input_schema: {
25
+ type: string;
26
+ properties: Record<string, any>;
27
+ required: string[];
28
+ };
29
+ }
30
+
31
+ class HealixPathServer {
32
+ private personas: Map<string, Persona>;
33
+
34
+ constructor() {
35
+ this.personas = loadPersonas();
36
+ }
37
+
38
+ getTools(): ToolSchema[] {
39
+ return [
40
+ {
41
+ name: "user_story",
42
+ description:
43
+ "Generate a structured narrative user story with acceptance criteria and risks",
44
+ input_schema: {
45
+ type: "object",
46
+ properties: {
47
+ product: {
48
+ type: "string",
49
+ description: "Description of the product or feature",
50
+ },
51
+ persona_id: {
52
+ type: "string",
53
+ description:
54
+ "ID of the persona to use (busy_parent, ops_engineer, product_manager)",
55
+ },
56
+ persona_override: {
57
+ type: "string",
58
+ description:
59
+ "Custom persona description if persona_id is not provided",
60
+ },
61
+ },
62
+ required: ["product"],
63
+ },
64
+ },
65
+ {
66
+ name: "customer_experience_tale",
67
+ description:
68
+ "Create a narrative describing a persona experiencing a specific problem",
69
+ input_schema: {
70
+ type: "object",
71
+ properties: {
72
+ problem: {
73
+ type: "string",
74
+ description: "The problem the persona is experiencing",
75
+ },
76
+ persona_id: {
77
+ type: "string",
78
+ description: "ID of the persona to use",
79
+ },
80
+ persona_override: {
81
+ type: "string",
82
+ description:
83
+ "Custom persona description if persona_id is not provided",
84
+ },
85
+ },
86
+ required: ["problem"],
87
+ },
88
+ },
89
+ {
90
+ name: "feature_impact_story",
91
+ description:
92
+ "Show the before and after of a persona interacting with a feature",
93
+ input_schema: {
94
+ type: "object",
95
+ properties: {
96
+ feature_description: {
97
+ type: "string",
98
+ description: "Description of the feature",
99
+ },
100
+ persona_id: {
101
+ type: "string",
102
+ description: "ID of the persona to use",
103
+ },
104
+ persona_override: {
105
+ type: "string",
106
+ description:
107
+ "Custom persona description if persona_id is not provided",
108
+ },
109
+ },
110
+ required: ["feature_description"],
111
+ },
112
+ },
113
+ {
114
+ name: "journey_map_story",
115
+ description:
116
+ "Generate a narrative for a specific stage of the user journey",
117
+ input_schema: {
118
+ type: "object",
119
+ properties: {
120
+ stage: {
121
+ type: "string",
122
+ description:
123
+ "Journey stage (e.g., awareness, consideration, adoption, retention)",
124
+ },
125
+ product: {
126
+ type: "string",
127
+ description: "Description of the product",
128
+ },
129
+ persona_id: {
130
+ type: "string",
131
+ description: "ID of the persona to use",
132
+ },
133
+ persona_override: {
134
+ type: "string",
135
+ description:
136
+ "Custom persona description if persona_id is not provided",
137
+ },
138
+ },
139
+ required: ["stage", "product"],
140
+ },
141
+ },
142
+ ];
143
+ }
144
+
145
+ async processTool(
146
+ toolName: string,
147
+ toolInput: Record<string, unknown>
148
+ ): Promise<string> {
149
+ let persona: Persona | undefined;
150
+
151
+ // Load persona if specified
152
+ if (typeof toolInput.persona_id === "string") {
153
+ const loadedPersona = getPersona(toolInput.persona_id, this.personas);
154
+ if (!loadedPersona) {
155
+ return JSON.stringify({
156
+ error: `Persona not found: ${toolInput.persona_id}`,
157
+ });
158
+ }
159
+ persona = loadedPersona;
160
+ }
161
+
162
+ try {
163
+ switch (toolName) {
164
+ case "user_story": {
165
+ const input = toolInput as unknown as UserStoryInput;
166
+ const userStory = await generateUserStory(input, persona);
167
+ return JSON.stringify(userStory);
168
+ }
169
+
170
+ case "customer_experience_tale": {
171
+ const input = toolInput as unknown as CustomerExperienceTaleInput;
172
+ const tale = await generateCustomerExperienceTale(input, persona);
173
+ return JSON.stringify(tale);
174
+ }
175
+
176
+ case "feature_impact_story": {
177
+ const input = toolInput as unknown as FeatureImpactStoryInput;
178
+ const impactStory = await generateFeatureImpactStory(input, persona);
179
+ return JSON.stringify(impactStory);
180
+ }
181
+
182
+ case "journey_map_story": {
183
+ const input = toolInput as unknown as JourneyMapStoryInput;
184
+ const journeyStory = await generateJourneyMapStory(input, persona);
185
+ return JSON.stringify(journeyStory);
186
+ }
187
+
188
+ default:
189
+ return JSON.stringify({ error: `Unknown tool: ${toolName}` });
190
+ }
191
+ } catch (error) {
192
+ return JSON.stringify({
193
+ error: `Failed to process tool: ${error instanceof Error ? error.message : String(error)}`,
194
+ });
195
+ }
196
+ }
197
+ }
198
+
199
+ // Example usage and server setup
200
+ async function main(): Promise<void> {
201
+ const server = new HealixPathServer();
202
+
203
+ console.log("🚀 HealixPath MCP Server");
204
+ console.log("=======================");
205
+ console.log("\nAvailable Tools:");
206
+ server.getTools().forEach((tool) => {
207
+ console.log(`\n- ${tool.name}`);
208
+ console.log(` ${tool.description}`);
209
+ });
210
+
211
+ console.log("\n\nAvailable Personas:");
212
+ console.log(
213
+ "- busy_parent: Working parent juggling multiple responsibilities"
214
+ );
215
+ console.log("- ops_engineer: On-call SRE managing infrastructure");
216
+ console.log("- product_manager: PM at a healthcare startup");
217
+
218
+ console.log("\n\n📝 Example Tool Calls:");
219
+ console.log("---");
220
+
221
+ // Example 1: User Story
222
+ const userStoryResult = await server.processTool("user_story", {
223
+ product: "Healthcare appointment scheduling app",
224
+ persona_id: "busy_parent",
225
+ });
226
+ console.log("\n1. User Story for Busy Parent:");
227
+ console.log(userStoryResult);
228
+
229
+ // Example 2: Customer Experience Tale
230
+ const taleResult = await server.processTool("customer_experience_tale", {
231
+ problem: "Mobile app crashes during checkout",
232
+ persona_id: "busy_parent",
233
+ });
234
+ console.log("\n2. Customer Experience Tale:");
235
+ console.log(taleResult);
236
+
237
+ // Example 3: Feature Impact Story
238
+ const impactResult = await server.processTool("feature_impact_story", {
239
+ feature_description: "One-click scheduling with automatic reminders",
240
+ persona_id: "busy_parent",
241
+ });
242
+ console.log("\n3. Feature Impact Story:");
243
+ console.log(impactResult);
244
+
245
+ // Example 4: Journey Map Story
246
+ const journeyResult = await server.processTool("journey_map_story", {
247
+ stage: "adoption",
248
+ product: "Healthcare platform",
249
+ persona_id: "ops_engineer",
250
+ });
251
+ console.log("\n4. Journey Map Story:");
252
+ console.log(journeyResult);
253
+
254
+ console.log("\n\n✅ HealixPath Server is ready to serve MCP clients!");
255
+ }
256
+
257
+ main().catch(console.error);
src/tools/customer_experience_tale.ts ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ CustomerExperienceTale,
3
+ generateStructuredResponse,
4
+ } from "../utils/helpers.js";
5
+ import { Persona, formatPersonaContext } from "../utils/persona_loader.js";
6
+ import {
7
+ SYSTEM_PROMPT,
8
+ CUSTOMER_EXPERIENCE_FEW_SHOT,
9
+ } from "../utils/prompts.js";
10
+
11
+ export interface CustomerExperienceTaleInput {
12
+ persona_id?: string;
13
+ persona_override?: string;
14
+ problem: string;
15
+ }
16
+
17
+ export async function generateCustomerExperienceTale(
18
+ input: CustomerExperienceTaleInput,
19
+ persona?: Persona
20
+ ): Promise<CustomerExperienceTale> {
21
+ const personaContext = persona
22
+ ? formatPersonaContext(persona)
23
+ : input.persona_override || "Generic user";
24
+
25
+ const userPrompt = `Create a customer experience tale for this scenario:
26
+
27
+ ${personaContext}
28
+
29
+ Problem: ${input.problem}
30
+
31
+ Write a realistic, detailed narrative that captures the emotional and practical dimensions of this problem.
32
+
33
+ ${CUSTOMER_EXPERIENCE_FEW_SHOT}`;
34
+
35
+ return generateStructuredResponse<CustomerExperienceTale>({
36
+ title: "customer_experience_tale",
37
+ systemPrompt: SYSTEM_PROMPT,
38
+ userPrompt,
39
+ schema: {
40
+ properties: {
41
+ title: { type: "string" },
42
+ narrative: { type: "string" },
43
+ pain_points: {
44
+ type: "array",
45
+ items: { type: "string" },
46
+ minItems: 3,
47
+ },
48
+ opportunities: {
49
+ type: "array",
50
+ items: { type: "string" },
51
+ minItems: 2,
52
+ },
53
+ },
54
+ required: ["title", "narrative", "pain_points", "opportunities"],
55
+ },
56
+ fallback: () => ({
57
+ title: `${persona?.name || "User"} Faces: ${input.problem}`,
58
+ narrative: `${
59
+ persona?.name || "The user"
60
+ } encounters ${input.problem}. This experience is frustrating because it directly conflicts with their need for efficiency and simplicity. The lack of clear guidance leaves them uncertain about next steps, adding to their stress.`,
61
+ pain_points: [
62
+ "Ambiguous problem messaging",
63
+ "Lack of clear resolution path",
64
+ "Time wasted troubleshooting",
65
+ ],
66
+ opportunities: [
67
+ "Implement proactive error prevention",
68
+ "Provide contextual help and guidance",
69
+ "Streamline the recovery process",
70
+ ],
71
+ }),
72
+ });
73
+ }
src/tools/feature_impact_story.ts ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ FeatureImpactStory,
3
+ generateStructuredResponse,
4
+ } from "../utils/helpers.js";
5
+ import { Persona, formatPersonaContext } from "../utils/persona_loader.js";
6
+ import { SYSTEM_PROMPT } from "../utils/prompts.js";
7
+
8
+ export interface FeatureImpactStoryInput {
9
+ feature_description: string;
10
+ persona_id?: string;
11
+ persona_override?: string;
12
+ }
13
+
14
+ export async function generateFeatureImpactStory(
15
+ input: FeatureImpactStoryInput,
16
+ persona?: Persona
17
+ ): Promise<FeatureImpactStory> {
18
+ const personaContext = persona
19
+ ? formatPersonaContext(persona)
20
+ : input.persona_override || "Generic user";
21
+
22
+ const userPrompt = `Create a before/after feature impact story:
23
+
24
+ ${personaContext}
25
+
26
+ Feature: ${input.feature_description}
27
+
28
+ Show how this feature transforms the user's experience and removes pain points.`;
29
+
30
+ return generateStructuredResponse<FeatureImpactStory>({
31
+ title: "feature_impact_story",
32
+ systemPrompt: SYSTEM_PROMPT,
33
+ userPrompt,
34
+ schema: {
35
+ properties: {
36
+ before_story: { type: "string" },
37
+ after_story: { type: "string" },
38
+ key_benefits: {
39
+ type: "array",
40
+ items: { type: "string" },
41
+ minItems: 3,
42
+ },
43
+ success_metrics: {
44
+ type: "array",
45
+ items: { type: "string" },
46
+ minItems: 3,
47
+ },
48
+ },
49
+ required: [
50
+ "before_story",
51
+ "after_story",
52
+ "key_benefits",
53
+ "success_metrics",
54
+ ],
55
+ },
56
+ fallback: () => ({
57
+ before_story: `Before this feature, ${
58
+ persona?.name || "the user"
59
+ } struggled with inefficient workflows. The process was manual, time-consuming, and error-prone, leaving them frustrated and exhausted.`,
60
+ after_story: `After implementing this feature, ${
61
+ persona?.name || "the user"
62
+ } experiences a dramatically improved workflow. Tasks that once took hours now take minutes, allowing them to focus on what truly matters.`,
63
+ key_benefits: [
64
+ "Significant time savings",
65
+ "Reduced manual effort",
66
+ "Improved accuracy and consistency",
67
+ "Enhanced user satisfaction",
68
+ ],
69
+ success_metrics: [
70
+ "Task completion time: -60%",
71
+ "User satisfaction score: +40%",
72
+ "Error rate reduction: -85%",
73
+ ],
74
+ }),
75
+ });
76
+ }
src/tools/journey_map_story.ts ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ JourneyMapStory,
3
+ generateStructuredResponse,
4
+ } from "../utils/helpers.js";
5
+ import { Persona, formatPersonaContext } from "../utils/persona_loader.js";
6
+ import { SYSTEM_PROMPT } from "../utils/prompts.js";
7
+
8
+ export interface JourneyMapStoryInput {
9
+ stage: string;
10
+ product: string;
11
+ persona_id?: string;
12
+ persona_override?: string;
13
+ }
14
+
15
+ export async function generateJourneyMapStory(
16
+ input: JourneyMapStoryInput,
17
+ persona?: Persona
18
+ ): Promise<JourneyMapStory> {
19
+ const personaContext = persona
20
+ ? formatPersonaContext(persona)
21
+ : input.persona_override || "Generic user";
22
+
23
+ const userPrompt = `Create a journey map narrative for a specific stage:
24
+
25
+ ${personaContext}
26
+
27
+ Product: ${input.product}
28
+ Journey Stage: ${input.stage}
29
+
30
+ Write a detailed narrative capturing the persona's experience, emotions, and interactions at this stage.`;
31
+
32
+ return generateStructuredResponse<JourneyMapStory>({
33
+ title: "journey_map_story",
34
+ systemPrompt: SYSTEM_PROMPT,
35
+ userPrompt,
36
+ schema: {
37
+ properties: {
38
+ stage: { type: "string" },
39
+ narrative: { type: "string" },
40
+ touchpoints: {
41
+ type: "array",
42
+ items: { type: "string" },
43
+ minItems: 3,
44
+ },
45
+ emotions: {
46
+ type: "array",
47
+ items: { type: "string" },
48
+ minItems: 2,
49
+ },
50
+ breakdowns: {
51
+ type: "array",
52
+ items: { type: "string" },
53
+ minItems: 2,
54
+ },
55
+ opportunities: {
56
+ type: "array",
57
+ items: { type: "string" },
58
+ minItems: 2,
59
+ },
60
+ },
61
+ required: [
62
+ "stage",
63
+ "narrative",
64
+ "touchpoints",
65
+ "emotions",
66
+ "breakdowns",
67
+ "opportunities",
68
+ ],
69
+ },
70
+ fallback: () => ({
71
+ stage: input.stage,
72
+ narrative: `At the ${input.stage} stage, ${
73
+ persona?.name || "the user"
74
+ } is navigating their journey with ${input.product}. Their emotions are mixed—hopeful about the potential benefits, but uncertain about the complexity they might face.`,
75
+ touchpoints: [
76
+ "Landing page or app entry point",
77
+ "Onboarding flow",
78
+ "Primary feature interaction",
79
+ "Support resources",
80
+ ],
81
+ emotions: [
82
+ "Anticipation",
83
+ "Confidence",
84
+ "Occasional frustration",
85
+ "Growing satisfaction",
86
+ ],
87
+ breakdowns: [
88
+ "Unclear value proposition",
89
+ "Complex setup process",
90
+ "Insufficient documentation",
91
+ "Slow initial results",
92
+ ],
93
+ opportunities: [
94
+ "Streamline onboarding",
95
+ "Provide quick wins",
96
+ "Offer contextual guidance",
97
+ "Build community support",
98
+ ],
99
+ }),
100
+ });
101
+ }
src/tools/user_story.ts ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { UserStory, generateStructuredResponse } from "../utils/helpers.js";
2
+ import { Persona, formatPersonaContext } from "../utils/persona_loader.js";
3
+ import { SYSTEM_PROMPT } from "../utils/prompts.js";
4
+
5
+ export interface UserStoryInput {
6
+ product: string;
7
+ persona_id?: string;
8
+ persona_override?: string;
9
+ }
10
+
11
+ export async function generateUserStory(
12
+ input: UserStoryInput,
13
+ persona?: Persona
14
+ ): Promise<UserStory> {
15
+ const personaContext = persona
16
+ ? formatPersonaContext(persona)
17
+ : input.persona_override || "Generic user";
18
+
19
+ const userPrompt = `Generate a user story for a ${input.product}.
20
+
21
+ ${personaContext}
22
+
23
+ Create an actionable narrative that incorporates the persona's goals, frustrations, and perspective.`;
24
+
25
+ return generateStructuredResponse<UserStory>({
26
+ title: "user_story",
27
+ systemPrompt: SYSTEM_PROMPT,
28
+ userPrompt,
29
+ schema: {
30
+ properties: {
31
+ story: { type: "string" },
32
+ acceptance_criteria: {
33
+ type: "array",
34
+ items: { type: "string" },
35
+ minItems: 3,
36
+ },
37
+ risks: {
38
+ type: "array",
39
+ items: { type: "string" },
40
+ minItems: 2,
41
+ },
42
+ },
43
+ required: ["story", "acceptance_criteria", "risks"],
44
+ },
45
+ fallback: () => ({
46
+ story: `As ${persona?.name || "a user"}, I want to use ${
47
+ input.product
48
+ } to achieve my goals efficiently and without frustration.`,
49
+ acceptance_criteria: [
50
+ "Clear, intuitive interface that requires minimal clicks",
51
+ "Fast loading times and responsive feedback",
52
+ "Easy-to-understand error messages",
53
+ ],
54
+ risks: [
55
+ "User may abandon if onboarding is too complex",
56
+ "Performance issues could lead to negative perception",
57
+ "Unclear messaging might cause support tickets",
58
+ ],
59
+ }),
60
+ });
61
+ }
src/utils/helpers.ts ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Anthropic from "@anthropic-ai/sdk";
2
+
3
+ export interface UserStory {
4
+ story: string;
5
+ acceptance_criteria: string[];
6
+ risks: string[];
7
+ }
8
+
9
+ export interface CustomerExperienceTale {
10
+ title: string;
11
+ narrative: string;
12
+ pain_points: string[];
13
+ opportunities: string[];
14
+ }
15
+
16
+ export interface FeatureImpactStory {
17
+ before_story: string;
18
+ after_story: string;
19
+ key_benefits: string[];
20
+ success_metrics: string[];
21
+ }
22
+
23
+ export interface JourneyMapStory {
24
+ stage: string;
25
+ narrative: string;
26
+ touchpoints: string[];
27
+ emotions: string[];
28
+ breakdowns: string[];
29
+ opportunities: string[];
30
+ }
31
+
32
+ interface StructuredGenerationOptions<T> {
33
+ title: string;
34
+ systemPrompt: string;
35
+ userPrompt: string;
36
+ schema: {
37
+ properties: Record<string, unknown>;
38
+ required?: string[];
39
+ };
40
+ fallback: () => T;
41
+ }
42
+
43
+ const anthropicApiKey = process.env.ANTHROPIC_API_KEY;
44
+ const anthropicModel =
45
+ process.env.ANTHROPIC_MODEL || "claude-3-5-sonnet-20241022";
46
+ const anthropicClient = anthropicApiKey
47
+ ? new Anthropic({ apiKey: anthropicApiKey })
48
+ : null;
49
+
50
+ export async function generateStructuredResponse<T>(
51
+ options: StructuredGenerationOptions<T>
52
+ ): Promise<T> {
53
+ const { title, systemPrompt, userPrompt, schema, fallback } = options;
54
+
55
+ if (!anthropicClient) {
56
+ console.warn(
57
+ "ANTHROPIC_API_KEY not set. Returning fallback output for",
58
+ title
59
+ );
60
+ return fallback();
61
+ }
62
+
63
+ try {
64
+ const response = await anthropicClient.messages.create({
65
+ model: anthropicModel,
66
+ max_tokens: 1024,
67
+ system: systemPrompt,
68
+ messages: [{ role: "user", content: userPrompt }],
69
+ });
70
+
71
+ const [firstChunk] = response.content;
72
+ if (firstChunk?.type === "text") {
73
+ return JSON.parse(firstChunk.text);
74
+ }
75
+
76
+ if (firstChunk?.type === "tool_use") {
77
+ return firstChunk.input as T;
78
+ }
79
+
80
+ throw new Error("Anthropic returned an unsupported content type");
81
+ } catch (error) {
82
+ console.error(
83
+ `Structured generation failed for ${title}:`,
84
+ error instanceof Error ? error.message : error
85
+ );
86
+ return fallback();
87
+ }
88
+ }
src/utils/persona_loader.ts ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { readFileSync } from "fs";
2
+ import { join } from "path";
3
+
4
+ export interface Persona {
5
+ id: string;
6
+ name: string;
7
+ role: string;
8
+ goals: string[];
9
+ frustrations: string[];
10
+ tech_comfort: string;
11
+ quote: string;
12
+ pain_points?: string[];
13
+ needs?: string[];
14
+ }
15
+
16
+ export function loadPersonas(): Map<string, Persona> {
17
+ try {
18
+ const personasPath = join(process.cwd(), "data", "personas.json");
19
+ const data = readFileSync(personasPath, "utf-8");
20
+ const personas: Persona[] = JSON.parse(data);
21
+
22
+ const personaMap = new Map<string, Persona>();
23
+ personas.forEach((persona) => {
24
+ personaMap.set(persona.id, persona);
25
+ });
26
+
27
+ return personaMap;
28
+ } catch (error) {
29
+ console.error("Failed to load personas:", error);
30
+ return new Map();
31
+ }
32
+ }
33
+
34
+ export function getPersona(personaId: string, personas: Map<string, Persona>): Persona | null {
35
+ return personas.get(personaId) || null;
36
+ }
37
+
38
+ export function formatPersonaContext(persona: Persona): string {
39
+ return `
40
+ Persona: ${persona.name}
41
+ Role: ${persona.role}
42
+ Goals: ${persona.goals.join(", ")}
43
+ Frustrations: ${persona.frustrations.join(", ")}
44
+ Tech Comfort Level: ${persona.tech_comfort}
45
+ Quote: "${persona.quote}"
46
+ ${persona.pain_points ? `Pain Points: ${persona.pain_points.join(", ")}` : ""}
47
+ ${persona.needs ? `Needs: ${persona.needs.join(", ")}` : ""}
48
+ `.trim();
49
+ }
src/utils/prompts.ts ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export const SYSTEM_PROMPT = `
2
+ You are HealixPath, an enterprise-grade AI persona path engine.
3
+ Your goal is to help product, UX, and design teams deeply understand users by generating realistic, structured persona-driven stories.
4
+
5
+ You ALWAYS:
6
+ - adopt the persona’s perspective (from persona_id data or persona_override text)
7
+ - integrate goals, frustrations, role, and quote into narrative context
8
+ - maintain realism with specific details (environment, device, timing)
9
+ - highlight both pain points and business opportunities
10
+ - write with clarity, professionalism, and grounded emotional tone
11
+ - output ONLY valid JSON in the exact schema specified by the user
12
+
13
+ Style:
14
+ - narratives: 250–600 words
15
+ - avoid buzzwords and marketing fluff
16
+ - focus on concrete behaviors & motivations
17
+ - connect the story directly back to the product input or feature description
18
+
19
+ If persona_id is provided, load persona data from the persona database.
20
+ If persona_override is provided, use it as supplemental context, not a replacement.
21
+
22
+ If both are missing, create a plausible persona from scratch with sensible traits.
23
+
24
+ Strictly follow schemas provided in each tool.
25
+ `.trim();
26
+
27
+ export const CUSTOMER_EXPERIENCE_FEW_SHOT = `
28
+ Example for customer_experience_tale
29
+ Input:
30
+ persona:
31
+ - name: Busy Parent
32
+ - role: Working parent of two kids
33
+ - goals: ["Save time", "Reduce mental load", "Keep kids on schedule"]
34
+ - frustrations: ["Too many apps", "Slow support", "Juggling work and home"]
35
+ - quote: "If it's not simple, I don't have time for it."
36
+ problem: "Promo code fails during mobile checkout on a flash sale"
37
+
38
+ Expected Output:
39
+ {
40
+ "title": "Promo Panic at Bedtime",
41
+ "narrative": "It's 8:45pm and Maya sinks into her couch after finally putting her two kids to bed...",
42
+ "pain_points": [
43
+ "Ambiguous promo code error message",
44
+ "Checkout form resets when navigating back",
45
+ "Customer support queue too long for short sessions"
46
+ ],
47
+ "opportunities": [
48
+ "Clearer inline error messaging",
49
+ "Auto-saving form state",
50
+ "Fast support path during busy sale windows"
51
+ ]
52
+ }
53
+ `.trim();
test_api.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ import os
3
+ from dotenv import load_dotenv
4
+ from anthropic import Anthropic
5
+
6
+ load_dotenv()
7
+ api_key = os.getenv('ANTHROPIC_API_KEY')
8
+ model = os.getenv('ANTHROPIC_MODEL', 'claude-3-haiku-20240307')
9
+
10
+ print(f'API Key found: {bool(api_key)}')
11
+ print(f'API Key (first 20 chars): {api_key[:20] if api_key else "None"}')
12
+ print(f'Model: {model}')
13
+
14
+ if api_key:
15
+ try:
16
+ client = Anthropic(api_key=api_key)
17
+ response = client.messages.create(
18
+ model=model,
19
+ max_tokens=100,
20
+ messages=[{'role': 'user', 'content': 'Say hello'}]
21
+ )
22
+ print(f'✅ API call successful!')
23
+ print(f'Response: {response.content[0].text}')
24
+ except Exception as e:
25
+ print(f'❌ API Error: {type(e).__name__}')
26
+ print(f'Message: {str(e)}')
27
+ else:
28
+ print('❌ No API key found')
tsconfig.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ES2020",
5
+ "lib": ["ES2020"],
6
+ "outDir": "./dist",
7
+ "rootDir": "./src",
8
+ "strict": false,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "sourceMap": true,
16
+ "moduleResolution": "node"
17
+ },
18
+ "include": ["src/**/*"],
19
+ "exclude": ["node_modules", "dist"]
20
+ }