-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse-prd-with-taskmaster.js
More file actions
598 lines (469 loc) · 21.7 KB
/
parse-prd-with-taskmaster.js
File metadata and controls
598 lines (469 loc) · 21.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
// Script to use Task Master AI to parse the PRD and create task structure
// Copy the PRD content here to parse
const prdContent = `# OnlyFans Management Assistant (OFMentor) PRD
## 1. Overview
OFMentor is an AI agent specifically designed to assist OnlyFans agency operators in all aspects of their business. The system serves as a comprehensive knowledge base and advisor on topics related to model recruitment, content strategy, traffic generation, sales optimization, backend operations, and growth tactics. By leveraging Retrieval-Augmented Generation (RAG) technology and a continuously updated knowledge base of YouTube content, OFMentor provides relevant, timely, and actionable advice for OnlyFans agency owners and managers.
### Problem Statement
OnlyFans agency operators face several challenges:
- Rapidly evolving platform policies and best practices
- Complex operational requirements across multiple models/accounts
- Need for specialized knowledge in marketing, sales, and content strategy
- Difficulty finding consolidated, up-to-date information on agency management
- Time-consuming research process to stay current with industry trends
OFMentor addresses these challenges by providing instant access to relevant knowledge and advice, allowing agency operators to make informed decisions quickly and efficiently.
### Target Users
- OnlyFans agency owners and managers
- Individual OnlyFans content creators looking to scale
- Virtual assistants handling OnlyFans account management
- Marketing specialists focusing on adult content promotion
### Value Proposition
OFMentor offers:
- 24/7 access to specialized OnlyFans agency management knowledge
- Continuously updated information from the latest industry sources
- Contextually relevant answers to specific operational questions
- Time savings through instant access to best practices and strategies
- Competitive advantage through access to growth hacking techniques
## 2. Core Features
### 2.1 Knowledge Base & Retrieval System
**Description**: A comprehensive, self-updating repository of information extracted from YouTube videos related to OnlyFans management.
**Components**:
- YouTube transcript crawler and parser
- Daily update mechanism for new content
- Vector database for efficient semantic searching
- Content categorization and tagging system
- Relevance ranking algorithm
**User Benefit**: Ensures users have access to the most current and relevant information about OnlyFans management techniques.
### 2.2 Natural Language Q&A Interface
**Description**: An intuitive chat interface that allows users to ask questions in natural language and receive contextually relevant answers.
**Components**:
- Query understanding and intent classification
- Context-aware response generation
- Conversational history management
- Clarification mechanisms for ambiguous queries
- Multi-turn conversation support
**User Benefit**: Provides a frictionless way to access specific information without navigating complex documentation or watching lengthy videos.
### 2.3 OnlyFans Domain Expertise
**Description**: Specialized knowledge in key areas of OnlyFans agency operations.
**Expertise Areas**:
- Model recruitment and management
- Content strategy and production
- Traffic generation techniques
- Chat automation and sales optimization
- Backend operations and financial management
- Growth hacking and advanced tactics
**User Benefit**: Delivers targeted advice for specific operational challenges in the OnlyFans agency business model.
### 2.4 Automated Knowledge Update Pipeline
**Description**: A system that continuously monitors, extracts, and integrates new information from YouTube into the knowledge base.
**Components**:
- Scheduled YouTube channel monitoring
- Transcript extraction and processing
- Content deduplication and conflict resolution
- Knowledge base integration
- Update notifications for significant new information
**User Benefit**: Ensures the system's knowledge remains current without requiring manual updates or maintenance.
### 2.5 Deployment Flexibility
**Description**: Multiple integration options for accessing the OFMentor agent.
**Deployment Options**:
- Web-based chat interface
- API for custom integration
- Discord bot integration
- Telegram bot integration
- Potential for other messaging platform integrations
**User Benefit**: Allows users to access OFMentor through their preferred communication channels.
## 3. User Experience
### 3.1 User Personas
#### Agency Owner (Primary)
- **Name**: Alex
- **Role**: Owner of an OnlyFans management agency with 10+ models
- **Goals**: Scale business operations, increase revenue, optimize workflows
- **Pain Points**: Time management, staying updated with best practices, finding qualified models
- **Usage Pattern**: Daily consultation on operational issues and strategic decisions
#### New Agency Operator
- **Name**: Taylor
- **Role**: Recently started managing 2-3 OnlyFans accounts
- **Goals**: Learn the fundamentals of agency operations, establish effective processes
- **Pain Points**: Information overload, unclear priorities, limited experience
- **Usage Pattern**: Intensive learning sessions, basic how-to questions
#### Virtual Assistant
- **Name**: Jordan
- **Role**: Handles day-to-day operations for multiple OnlyFans accounts
- **Goals**: Efficiently manage tasks, improve engagement rates, troubleshoot issues
- **Pain Points**: Repetitive questions, keeping up with platform changes
- **Usage Pattern**: Task-specific queries throughout workday
### 3.2 Key User Flows
#### Initial Consultation
1. User accesses OFMentor through their preferred interface
2. System welcomes user and explains capabilities
3. User describes their current situation and challenges
4. OFMentor provides tailored initial recommendations
5. System guides user to relevant topic areas for deeper exploration
#### Specific Query Resolution
1. User asks a specific question about OnlyFans management
2. System analyzes query intent and context
3. OFMentor retrieves relevant information from knowledge base
4. System generates comprehensive, actionable response
5. User can ask follow-up questions for clarification or depth
#### Strategy Development
1. User specifies a business goal (e.g., "How do I increase subscription conversion rates?")
2. OFMentor explores multiple strategic approaches
3. System presents options with pros/cons analysis
4. User asks clarifying questions about implementation
5. OFMentor provides step-by-step implementation guidance
#### Knowledge Update Notification
1. System identifies significant new information from YouTube sources
2. OFMentor proactively notifies user about relevant updates
3. User can request details about the new information
4. System explains implications for the user's operations
5. OFMentor integrates new knowledge into future responses
### 3.3 UI/UX Considerations
- **Chat Interface**: Clean, intuitive design with conversation history
- **Response Formatting**: Well-structured answers with headers, bullet points, and emphasis for readability
- **Source Attribution**: Transparent references to source materials
- **Mobile Responsiveness**: Fully functional on all device sizes
- **Accessibility**: Compliance with WCAG guidelines for maximum usability
- **Dark Mode**: Support for reduced eye strain during extended use
- **Response Time**: Near-instant responses to maintain engagement
- **Error Handling**: Clear communication when queries fall outside knowledge domain
## 4. Technical Architecture
### 4.1 System Components
#### Data Acquisition Layer
- YouTube API integration for channel and video discovery
- Transcript extraction service
- Data cleaning and preprocessing pipeline
- Metadata enrichment system
#### Knowledge Processing Layer
- Text chunking and segmentation module
- Vector embedding generation
- Semantic indexing system
- Information categorization and tagging
#### Storage Layer
- Vector database (e.g., Pinecone, Weaviate, or Qdrant)
- Document store for raw transcript data
- Metadata database
- User conversation history database
#### Retrieval Layer
- Query understanding module
- Context-aware search system
- Relevance scoring algorithm
- Source aggregation engine
#### Generation Layer
- Large Language Model integration (e.g., OpenAI GPT-4, Claude 3)
- Response formatting module
- Citation and reference system
- Confidence scoring mechanism
#### Deployment Layer
- Web server for chat interface
- API gateway for integrations
- WebSocket server for real-time communication
- Authentication and authorization system
### 4.2 Data Models
#### Transcript Document
\`\`\`json
{
"transcript_id": "unique_identifier",
"video_id": "youtube_video_id",
"channel_id": "youtube_channel_id",
"title": "Video Title",
"description": "Video Description",
"publish_date": "ISO8601_date",
"categories": ["category1", "category2"],
"content": "Full transcript text",
"chunks": [
{
"chunk_id": "chunk_identifier",
"text": "Segment of transcript",
"start_time": "time_in_seconds",
"end_time": "time_in_seconds",
"embedding": [vector_data],
"metadata": {}
}
]
}
\`\`\`
#### Knowledge Entity
\`\`\`json
{
"entity_id": "unique_identifier",
"type": "concept/strategy/tactic/tool",
"name": "Entity Name",
"description": "Entity Description",
"related_entities": ["entity_id1", "entity_id2"],
"source_references": [
{
"transcript_id": "source_transcript",
"chunk_ids": ["chunk_id1", "chunk_id2"],
"confidence": 0.95
}
],
"last_updated": "ISO8601_date",
"embedding": [vector_data]
}
\`\`\`
#### User Conversation
\`\`\`json
{
"conversation_id": "unique_identifier",
"user_id": "user_identifier",
"start_time": "ISO8601_date",
"last_activity": "ISO8601_date",
"messages": [
{
"message_id": "message_identifier",
"role": "user/assistant",
"content": "Message text",
"timestamp": "ISO8601_date",
"referenced_entities": ["entity_id1", "entity_id2"],
"referenced_chunks": ["chunk_id1", "chunk_id2"]
}
],
"metadata": {
"user_context": {},
"derived_interests": [],
"session_metrics": {}
}
}
\`\`\`
### 4.3 APIs and Integrations
#### External APIs
- YouTube Data API v3
- YouTube Transcript API
- OpenAI API or other LLM provider
- Vector database API
- Authentication service API
- Analytics and telemetry API
#### Internal APIs
- Transcript Acquisition API
- Knowledge Base Query API
- Conversation Management API
- User Management API
- System Health and Monitoring API
#### Webhooks and Events
- Knowledge base update events
- New source material notifications
- User engagement events
- Error and exception events
- System performance metrics
### 4.4 Infrastructure Requirements
#### Compute Resources
- Application servers (4+ cores, 16GB+ RAM)
- Background task workers
- Scheduled job processors
#### Storage Requirements
- Vector database (scalable based on knowledge growth)
- Document store (initial 100GB, expandable)
- Relational database (user data, configurations)
- Object storage (raw transcripts, backups)
#### Networking
- API gateway with rate limiting
- CDN for static assets
- WebSocket servers for real-time chat
- Secure communication channels (TLS/SSL)
#### Monitoring and Logging
- System health monitoring
- Error tracking and alerting
- Performance metrics collection
- Usage analytics
- Audit logging
## 5. Development Roadmap
### Phase 1: MVP Foundation (Core Knowledge Engine)
**Objective**: Establish the basic infrastructure for knowledge acquisition and retrieval.
**Deliverables**:
- YouTube transcript crawler and parser
- Basic vector database integration
- Simple RAG-based question answering
- Command-line interface for testing
- Initial knowledge base from 50-100 top OnlyFans management videos
**Success Criteria**:
- System can accurately answer basic questions about OnlyFans management
- Knowledge retrieval shows relevant context from source videos
- Response generation is coherent and helpful
### Phase 2: Enhanced Knowledge Management
**Objective**: Improve the quality, organization, and retrieval of knowledge.
**Deliverables**:
- Advanced text processing and chunking
- Hierarchical knowledge categorization
- Improved relevance ranking algorithms
- Content deduplication and conflict resolution
- Expanded knowledge base (200+ videos)
- Knowledge freshness tracking and prioritization
**Success Criteria**:
- More accurate and relevant responses
- Clear handling of conflicting information
- Improved context preservation in responses
- Knowledge gaps identification
### Phase 3: Conversational UI and Initial Deployment
**Objective**: Create a user-friendly interface and deploy for initial testing.
**Deliverables**:
- Web-based chat interface
- Multi-turn conversation management
- User authentication and conversation history
- Basic deployment infrastructure
- Initial user documentation
- Alpha testing with limited users
**Success Criteria**:
- Positive user feedback on interface usability
- System stability under actual usage
- Successful handling of real-world queries
### Phase 4: Automated Knowledge Update Pipeline
**Objective**: Implement the continuous learning system for automatic updates.
**Deliverables**:
- Scheduled YouTube channel monitoring
- Automated transcript extraction and processing
- Knowledge integration workflow
- Update notification system
- Content freshness metrics
- Knowledge change tracking
**Success Criteria**:
- Daily successful acquisition of new content
- Proper integration of new knowledge
- Timely notifications of significant updates
- Measurable knowledge base growth
### Phase 5: Advanced Features and Platform Integrations
**Objective**: Enhance the system with specialized features and wider accessibility.
**Deliverables**:
- Advanced domain expertise modules for specialized areas
- Discord and Telegram bot integrations
- API for third-party integrations
- Performance optimization for scale
- Enhanced analytics and usage insights
- Beta release to wider audience
**Success Criteria**:
- Specialized advice for complex scenarios
- Successful platform integrations
- API reliability and documentation quality
- Positive user adoption metrics
### Phase 6: Refinement and Official Release
**Objective**: Polish all aspects of the system for production-ready status.
**Deliverables**:
- Performance and scalability optimizations
- Comprehensive error handling
- Enhanced security features
- Full user documentation
- Support infrastructure
- Official release with marketing materials
**Success Criteria**:
- System stability under load
- User satisfaction metrics
- Clear path to sustainability
- Growing user base
## 6. Logical Dependency Chain
### Foundation Layer (Must be built first)
1. **Data Acquisition System**: YouTube transcript collection mechanism
2. **Basic Knowledge Storage**: Vector database implementation for storing and retrieving information
3. **Simple Query Processing**: Basic RAG implementation to retrieve and generate responses
### Core Functionality Layer
4. **Knowledge Organization**: Categorization and structuring of information
5. **Context-Aware Retrieval**: Enhanced search to find the most relevant information
6. **Response Generation**: Improved response formulation with source attribution
### User Interaction Layer
7. **Chat Interface**: Conversational UI for interacting with the system
8. **Multi-Turn Conversation**: Support for follow-up questions and context preservation
9. **User Management**: Authentication, history, and preferences
### Continuous Improvement Layer
10. **Automated Updates**: System for discovering and incorporating new content
11. **Knowledge Consistency**: Mechanisms for handling contradictory information
12. **Knowledge Gap Identification**: Detection of missing information areas
### Deployment & Integration Layer
13. **Web Application**: Complete web-based interface
14. **Platform Bots**: Discord, Telegram integration
15. **External API**: Interface for third-party integration
### Scaling & Enhancement Layer
16. **Performance Optimization**: Handling increased user load
17. **Advanced Domain Features**: Specialized modules for complex topics
18. **Analytics & Feedback**: Systems for monitoring and improving quality
## 7. Risks and Mitigations
### Technical Risks
#### Risk: YouTube API Limitations and Rate Limiting
- **Impact**: Could restrict data acquisition capabilities
- **Mitigation**: Implement smart batching, caching, and request spacing; maintain backup data sources; consider multiple API keys rotation
#### Risk: Knowledge Base Quality and Coherence
- **Impact**: Unreliable or contradictory information could damage user trust
- **Mitigation**: Implement source credibility scoring, conflict detection algorithms, regular knowledge base audits, and feedback mechanisms
#### Risk: LLM Hallucinations and False Information
- **Impact**: System could generate incorrect or fabricated responses
- **Mitigation**: Strict RAG implementation with source citation, confidence scoring for responses, transparent uncertainty communication, and user feedback loops
#### Risk: Scalability Challenges with Growing Knowledge Base
- **Impact**: System performance could degrade as the knowledge base expands
- **Mitigation**: Implement efficient indexing strategies, knowledge pruning mechanisms, and scalable infrastructure; conduct regular performance testing
### Business Risks
#### Risk: Content Moderation and Platform Policies
- **Impact**: YouTube or AI providers might restrict content related to adult industries
- **Mitigation**: Implement content filtering and moderation, maintain alternative data sources, and develop contingency plans for content acquisition
#### Risk: Legal Compliance Issues
- **Impact**: Potential legal complications regarding adult content advice
- **Mitigation**: Clear terms of service, disclaimers, compliance review of knowledge base, and regular legal audits
#### Risk: Competitive Landscape Changes
- **Impact**: Similar tools or services could emerge
- **Mitigation**: Focus on specialized knowledge depth, rapid iteration on user feedback, and community building
#### Risk: Revenue Model Sustainability
- **Impact**: Difficulty in monetizing effectively while keeping the service accessible
- **Mitigation**: Tiered subscription model, premium features strategy, and clear value demonstration
### User Adoption Risks
#### Risk: User Expectation Management
- **Impact**: Users may expect perfect responses to every query
- **Mitigation**: Clear communication about system capabilities and limitations, transparent confidence indicators, and gradual feature rollout
#### Risk: Learning Curve and Usability
- **Impact**: Users might find the system difficult to use effectively
- **Mitigation**: Intuitive UI design, comprehensive onboarding, usage examples, and responsive support
#### Risk: Privacy and Data Security Concerns
- **Impact**: Users may be hesitant to discuss sensitive business details
- **Mitigation**: Strong data protection policies, transparent data usage, optional anonymized mode, and security certifications
## 8. Appendix
### A. Market Research
The OnlyFans creator economy continues to grow, with over 2 million creators earning more than $16 billion since the platform's inception. Agencies managing multiple creators have emerged as a significant business model, requiring specialized knowledge and operational expertise.
Key market insights:
- Growing number of OnlyFans management agencies
- Increasing complexity of platform policies and best practices
- High demand for strategies to increase revenue and subscriber retention
- Limited consolidated sources of operational knowledge
- Significant time investment required for research and staying current
### B. Competitor Analysis
Current knowledge sources for OnlyFans management include:
- YouTube channels (fragmented, time-consuming)
- Reddit threads and forums (inconsistent quality)
- Paid courses and mentorship (expensive, often outdated)
- General AI assistants (lack specialized knowledge)
No comprehensive, AI-powered assistant specifically for OnlyFans management currently exists in the market.
### C. Technical Specifications
#### Knowledge Base Metrics
- Initial Target: 100+ hours of transcribed content
- Projected Growth: 10+ hours of new content weekly
- Chunking Strategy: 100-200 token segments with 50% overlap
- Vector Dimensions: 1536 (OpenAI embeddings) or similar
#### Performance Targets
- Query Response Time: < 3 seconds for 90% of queries
- Accuracy Rate: > 85% relevant information retrieval
- System Availability: 99.9% uptime
- Concurrent Users Support: 100+ (initial target)
#### Security Requirements
- Data Encryption: AES-256 at rest, TLS 1.3 in transit
- Authentication: OAuth 2.0, MFA for administrative access
- Regular Security Audits and Penetration Testing
- Compliance with Data Protection Regulations
### D. Future Enhancements Considerations
Potential future capabilities:
- Content strategy generator based on performance analytics
- Competitive analysis of similar OnlyFans accounts
- Automated chat message templates and responses
- Integration with OnlyFans analytics platforms
- AI-generated content ideas and calendars
- Pricing strategy optimization
- Custom agent swarms for specific OnlyFans business functions`;
// Save the PRD to a file
const fs = require('fs');
const path = require('path');
// Create needed directories
const tasksDir = path.join(__dirname, 'tasks');
if (!fs.existsSync(tasksDir)) {
fs.mkdirSync(tasksDir, { recursive: true });
}
// Save PRD to scripts directory for parsing
const scriptsDir = path.join(__dirname, 'scripts');
if (!fs.existsSync(scriptsDir)) {
fs.mkdirSync(scriptsDir, { recursive: true });
}
// Write PRD content to a file
const prdFilePath = path.join(scriptsDir, 'prd.txt');
fs.writeFileSync(prdFilePath, prdContent);
console.log('PRD saved to:', prdFilePath);
console.log('Now run: node claude-task-master/bin/task-master.js parse-prd scripts/prd.txt');