ip-operator-ready-seed.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. (() => {
  2. const scope = 'local-guest';
  3. const now = new Date().toISOString();
  4. const profileId = 'ip_profile_e2e_ready';
  5. const planId = 'ip_plan_e2e_ready';
  6. const user = {
  7. objectId: scope,
  8. username: 'ip-operator-e2e',
  9. displayName: 'IP Operator E2E',
  10. role: 'user',
  11. createdAt: now,
  12. };
  13. const profile = {
  14. id: profileId,
  15. userId: scope,
  16. name: 'E2E IP Operator Profile',
  17. stage: 'started',
  18. identity: 'Traditional industry consultant for local business owners',
  19. industry: 'Local service business',
  20. targetAudience: 'Owners who need practical IP-driven content and trust conversion',
  21. audiencePainPoints: ['Content looks like advertising', 'No stable topic system'],
  22. productsOrServices: 'IP positioning and content operation consulting',
  23. personalStories: ['Helped a local service team turn cases into short video topics'],
  24. expertise: ['Positioning', 'Topic planning', 'Script diagnosis'],
  25. expressionStyle: ['Direct', 'Practical'],
  26. boundaries: ['No exaggerated income promise'],
  27. goals: ['Build trust', 'Collect consultation leads'],
  28. questionnaire: [],
  29. createdAt: now,
  30. updatedAt: now,
  31. };
  32. const topics = Array.from({ length: 12 }, (_, index) => {
  33. const id = `ip_topic_e2e_${index + 1}`;
  34. return {
  35. id,
  36. title: index === 0 ? 'Why owner IP should not look like an ad account' : `Owner IP trust topic ${index + 1}`,
  37. column: index % 3 === 0 ? 'Positioning diagnosis' : index % 3 === 1 ? 'Trust content' : 'Conversion path',
  38. trafficLayer: index < 4 ? 'vertical' : index < 8 ? 'conversion' : 'broad',
  39. contentGoal: 'Help the target user understand the trust problem and next action',
  40. priority: index < 4 ? 'high' : index < 9 ? 'medium' : 'low',
  41. fitReason: 'Derived from benchmark hooks and adapted to this IP positioning',
  42. source: 'Benchmark migration',
  43. requiredMaterials: ['Real case', 'Service before-after comparison'],
  44. scriptStatus: index < 3 ? 'full' : 'outline',
  45. riskNote: 'Avoid hard selling and exaggerated claims',
  46. };
  47. });
  48. const scripts = topics.map((topic, index) => ({
  49. id: `ip_script_e2e_${index + 1}`,
  50. topicId: topic.id,
  51. type: index < 3 ? 'full' : 'outline',
  52. title: topic.title,
  53. hook: 'If your account keeps introducing products, users will treat it as advertising.',
  54. painPoint: 'The content has information but no trust context.',
  55. viewpoint: 'Owner IP must first transmit judgement, not product inventory.',
  56. caseOrMethod: 'Use one benchmark hook, one real scenario, and one conversion boundary.',
  57. goldenSentence: 'Trust comes before transaction.',
  58. closingCta: 'Save this and check whether your next video is selling or building trust.',
  59. fullScript: index < 3
  60. ? 'Opening: many owner accounts look professional but still fail to convert. Middle: users do not reject business, they reject content that only pushes products. Example: when a local service owner changed from product introductions to decision-making stories, consultation quality improved. Ending: the next video should answer one real customer doubt before mentioning the product.'
  61. : '',
  62. shootingTips: ['Talk to camera', 'Use one service case'],
  63. subtitleHighlights: ['Do not sell first', 'Show judgement first'],
  64. replaceableSlots: ['Insert local case'],
  65. riskNote: 'Do not claim guaranteed conversion.',
  66. }));
  67. const plan = {
  68. id: planId,
  69. userId: scope,
  70. profileId,
  71. status: 'ready',
  72. generationProgress: [
  73. { stage: 'intake_summary', label: 'Intake summary', status: 'completed', durationMs: 120 },
  74. { stage: 'diagnosis', label: 'Diagnosis', status: 'completed', durationMs: 120 },
  75. { stage: 'benchmark', label: 'Benchmark analysis', status: 'completed', durationMs: 120 },
  76. { stage: 'opportunities', label: 'Opportunity map', status: 'completed', durationMs: 120 },
  77. { stage: 'topics_scripts_plan', label: 'Topics and scripts', status: 'completed', durationMs: 120 },
  78. { stage: 'quality_check', label: 'Quality check', status: 'completed', durationMs: 120 },
  79. ],
  80. qualityCheck: {
  81. overallScore: 88,
  82. positioningClarityScore: 90,
  83. audienceClarityScore: 86,
  84. evidenceSupportScore: 84,
  85. benchmarkTransferScore: 88,
  86. topicUsabilityScore: 91,
  87. passed: true,
  88. blockingIssues: [],
  89. improvementSuggestions: ['Validate the first three full scripts with real material.'],
  90. },
  91. intakeSummary: {
  92. identitySummary: 'Local business IP operator',
  93. audienceSummary: 'Traditional business owners',
  94. advantageSummary: 'Can translate business cases into practical content',
  95. businessGoalSummary: 'Build trust and collect consultation leads',
  96. missingInputs: [],
  97. },
  98. diagnosis: {
  99. positioningStatement: 'A practical operator who turns local business experience into trusted owner IP content.',
  100. targetAudience: {
  101. summary: 'Owners who need short video content but do not want to become ad accounts.',
  102. painPoints: ['No topic system', 'Content lacks trust', 'Hard to convert'],
  103. },
  104. marketOpportunity: 'Many local businesses have real cases but lack content packaging.',
  105. ipType: 'Operator partner',
  106. personaTags: ['Practical', 'Case-driven', 'Trust-first'],
  107. differentiation: 'Turns benchmark hot points into positioning-matched topics instead of copying formats.',
  108. contentTracks: ['Positioning diagnosis', 'Trust cases', 'Conversion path'],
  109. monetizationPath: 'Consultation and operation service leads.',
  110. risks: ['Avoid exaggerated conversion promises'],
  111. alternativeDirections: ['Focus on one local industry first'],
  112. missingInputs: [],
  113. },
  114. benchmarkAnalyses: [{
  115. benchmarkId: 'benchmark_e2e_1',
  116. accountName: 'Benchmark Owner Account',
  117. positioning: 'Direct business advice for owners',
  118. contentColumns: ['Pain point diagnosis', 'Case breakdown'],
  119. viralPatterns: ['Question hook', 'Concrete contrast'],
  120. scriptStructure: 'Hook - pain - viewpoint - case - action',
  121. conversionPath: 'Content trust to consultation',
  122. borrowablePoints: ['Direct question hooks', 'Case contrast'],
  123. nonCopyablePoints: ['Personal background', 'Exact industry claims'],
  124. migrationDirection: 'Use the hook logic, replace the case and judgement with this IP assets.',
  125. fitScore: 86,
  126. }],
  127. opportunityMap: [{
  128. id: 'ip_opp_e2e_1',
  129. type: 'Trust diagnosis',
  130. fitScore: 90,
  131. reason: 'Matches audience pain and available expertise.',
  132. audiencePainPoint: 'Users do not trust product-only content.',
  133. requiredMaterials: ['Before-after case'],
  134. extendableTopics: ['Ad account problem', 'Trust building'],
  135. riskBoundary: 'No guaranteed result claim.',
  136. }],
  137. topics,
  138. scripts,
  139. sevenDayTestPlan: topics.slice(0, 7).map((topic, index) => ({
  140. day: index + 1,
  141. topicId: topic.id,
  142. topicTitle: topic.title,
  143. testGoal: 'Validate hook clarity and trust response.',
  144. contentType: topic.trafficLayer,
  145. shootingFocus: 'Talk to camera with one real scenario.',
  146. observeMetrics: ['Completion', 'Comment quality', 'Consultation intent'],
  147. reviewQuestions: ['Did users understand the pain?', 'Was the CTA too hard?'],
  148. })),
  149. thirtyDayDirection: {
  150. columnStructure: [
  151. { column: 'Positioning diagnosis', ratio: 40, role: 'Trust entry' },
  152. { column: 'Trust content', ratio: 35, role: 'Relationship building' },
  153. { column: 'Conversion path', ratio: 25, role: 'Lead collection' },
  154. ],
  155. weeklyFocus: ['Validate hooks', 'Add case material', 'Test conversion CTA', 'Review topic columns'],
  156. materialDirections: ['Customer doubt list', 'Before-after cases', 'Service process screenshots'],
  157. iterationPath: ['Keep high-comment questions', 'Rewrite weak hooks', 'Promote proven topics'],
  158. },
  159. missingInputs: [],
  160. createdAt: now,
  161. updatedAt: now,
  162. };
  163. localStorage.setItem(`tiktok.ipOperator.profiles.${scope}`, JSON.stringify([profileId]));
  164. localStorage.setItem(`tiktok.ipOperator.profile.${profileId}.${scope}`, JSON.stringify(profile));
  165. localStorage.setItem(`tiktok.ipOperator.plans.${scope}`, JSON.stringify([planId]));
  166. localStorage.setItem(`tiktok.ipOperator.plan.${planId}.${scope}`, JSON.stringify(plan));
  167. localStorage.setItem(`tiktok.ipOperator.activeProfileId.${scope}`, profileId);
  168. localStorage.setItem('videoWorkflow.authSession', JSON.stringify({ token: 'ip-operator-e2e-token', user }));
  169. localStorage.setItem('tiktok.currentTab', 'ip-operator');
  170. localStorage.removeItem('videoWorkflow.topicPool.items');
  171. sessionStorage.clear();
  172. return { profileId, planId, topics: topics.length, scripts: scripts.length };
  173. })();