vibebusiness 1.2.37 → 1.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.next/standalone/.env +1 -0
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-build-manifest.json +13 -13
  4. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/.next/build-manifest.json +2 -2
  6. package/.next/standalone/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  9. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  10. package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
  13. package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
  27. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/landing.html +1 -1
  38. package/.next/standalone/.next/server/app/landing.rsc +1 -1
  39. package/.next/standalone/.next/server/app/page.js +1 -1
  40. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/roadmap/[id]/page.js +1 -1
  43. package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/settings.html +1 -1
  50. package/.next/standalone/.next/server/app/settings.rsc +1 -1
  51. package/.next/standalone/.next/server/app-paths-manifest.json +4 -4
  52. package/.next/standalone/.next/server/pages/404.html +1 -1
  53. package/.next/standalone/.next/server/pages/500.html +1 -1
  54. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  55. package/.next/standalone/data/business-context.json +9 -1
  56. package/.next/standalone/data/email-campaigns/sequences/onboarding.md +183 -0
  57. package/.next/standalone/data/email-campaigns/welcome-2026-02-20.md +61 -0
  58. package/.next/standalone/data/goals.json +3 -2
  59. package/.next/standalone/data/heartbeat-sessions.json +798 -0
  60. package/.next/standalone/data/ideas.json +668 -80
  61. package/.next/standalone/data/implementations.json +397 -0
  62. package/.next/standalone/package.json +1 -1
  63. package/.next/static/chunks/app/page-6a52a6950963129a.js +1 -0
  64. package/.next/static/chunks/app/roadmap/[id]/page-3848fd96de497d11.js +1 -0
  65. package/dist/scripts/analyze.js +1 -0
  66. package/dist/scripts/chat.js +1 -0
  67. package/dist/scripts/generate-idea.js +1 -0
  68. package/dist/scripts/heartbeat.js +1620 -168
  69. package/dist/scripts/implement.js +1 -0
  70. package/dist/scripts/init.js +1 -0
  71. package/dist/scripts/scan.js +1 -0
  72. package/package.json +1 -1
  73. package/templates/commands/email-marketing.md +201 -0
  74. package/.next/static/chunks/app/page-999b97bf50993294.js +0 -1
  75. package/.next/static/chunks/app/roadmap/[id]/page-da3d51358c8e2014.js +0 -1
  76. /package/.next/static/{Lbwr50a6hdyjnsxpep4G9 → k40DKimnEdAtBs_zywSQ4}/_buildManifest.js +0 -0
  77. /package/.next/static/{Lbwr50a6hdyjnsxpep4G9 → k40DKimnEdAtBs_zywSQ4}/_ssgManifest.js +0 -0
@@ -152,6 +152,7 @@ var ROADMAP_FILE = path2.join(DATA_DIR, "roadmap.json");
152
152
  var COMPETITORS_FILE = path2.join(DATA_DIR, "competitors.json");
153
153
  var POSITIONING_FILE = path2.join(DATA_DIR, "positioning.json");
154
154
  var PAGES_FILE = path2.join(DATA_DIR, "pages.json");
155
+ var PAYMENTS_FILE = path2.join(DATA_DIR, "payments.json");
155
156
  var TEMPLATES_DIR = path2.join(__dirname, "..", "..", "templates");
156
157
  var COMMAND_TEMPLATES_DIR = path2.join(TEMPLATES_DIR, "commands");
157
158
 
@@ -442,6 +442,7 @@ var ROADMAP_FILE = path6.join(DATA_DIR, "roadmap.json");
442
442
  var COMPETITORS_FILE = path6.join(DATA_DIR, "competitors.json");
443
443
  var POSITIONING_FILE = path6.join(DATA_DIR, "positioning.json");
444
444
  var PAGES_FILE = path6.join(DATA_DIR, "pages.json");
445
+ var PAYMENTS_FILE = path6.join(DATA_DIR, "payments.json");
445
446
  var TEMPLATES_DIR = path6.join(__dirname, "..", "..", "templates");
446
447
  var COMMAND_TEMPLATES_DIR = path6.join(TEMPLATES_DIR, "commands");
447
448
 
@@ -299,6 +299,7 @@ var ROADMAP_FILE = path2.join(DATA_DIR, "roadmap.json");
299
299
  var COMPETITORS_FILE = path2.join(DATA_DIR, "competitors.json");
300
300
  var POSITIONING_FILE = path2.join(DATA_DIR, "positioning.json");
301
301
  var PAGES_FILE = path2.join(DATA_DIR, "pages.json");
302
+ var PAYMENTS_FILE = path2.join(DATA_DIR, "payments.json");
302
303
  var TEMPLATES_DIR = path2.join(__dirname, "..", "..", "templates");
303
304
  var COMMAND_TEMPLATES_DIR = path2.join(TEMPLATES_DIR, "commands");
304
305
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibebusiness",
3
- "version": "1.2.37",
3
+ "version": "1.2.39",
4
4
  "description": "AI-powered autonomous business analyst. Research. Build. Ship. Grow.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,
@@ -0,0 +1,201 @@
1
+ # /email-marketing — Email Marketing Setup & Campaign Generator
2
+
3
+ ## Usage
4
+ ```
5
+ /email-marketing setup # Guided Loops.so setup wizard
6
+ /email-marketing campaign welcome # Generate a welcome email campaign
7
+ /email-marketing campaign onboarding # Generate an onboarding drip email
8
+ /email-marketing campaign feature-announcement # New feature announcement
9
+ /email-marketing campaign re-engagement # Win-back inactive users
10
+ /email-marketing campaign milestone # User achievement celebration
11
+ /email-marketing sequence {name} # Design a multi-email drip sequence
12
+ /email-marketing blast {slug} # Draft a one-off announcement email
13
+ ```
14
+
15
+ ## Input
16
+ - `$ARGUMENTS` — required: one of the modes above
17
+
18
+ ## Process
19
+
20
+ Parse `$ARGUMENTS` to determine mode. The first word is the mode, the rest are arguments.
21
+
22
+ ---
23
+
24
+ ### Mode: `setup`
25
+
26
+ Interactive Loops.so setup wizard.
27
+
28
+ 1. **Check API Key**: Verify `LOOPS_API_KEY` is set in the environment
29
+ - If not set: print instructions to add it to `.env` and stop
30
+ - If set: call `GET /api/v1/api-key` to verify it's valid
31
+
32
+ 2. **Audit Current State**:
33
+ - List existing mailing lists via the Loops API
34
+ - List existing contact properties
35
+ - List existing transactional email templates
36
+ - Print a summary of what's already configured
37
+
38
+ 3. **Set Up Contact Properties**: Create recommended properties if they don't exist:
39
+ - `source` (string) — where the contact came from (e.g., "website", "twitter", "producthunt")
40
+ - `userGroup` (string) — segment (e.g., "beta_tester", "waitlist", "customer")
41
+ - `plan` (string) — pricing plan (e.g., "free", "pro", "enterprise")
42
+
43
+ 4. **Configure KPI Adapter**: Read `data/business-context.json` and check if a `loops` KPI adapter is configured. If not, add one:
44
+ ```json
45
+ {
46
+ "id": "loops",
47
+ "type": "loops",
48
+ "field_mapping": {
49
+ "kpi-waitlist-signups": "total_contacts"
50
+ }
51
+ }
52
+ ```
53
+
54
+ 5. **Print Summary**: What was set up, what was already configured, next steps (run `/email-marketing campaign welcome` to create first email).
55
+
56
+ ---
57
+
58
+ ### Mode: `campaign {type}`
59
+
60
+ Generate an email campaign draft using positioning data and business context.
61
+
62
+ Supported types: `welcome`, `onboarding`, `feature-announcement`, `re-engagement`, `milestone`
63
+
64
+ 1. **Load Context**:
65
+ - Read `data/positioning.json` — headlines, CTAs, pain points, objection handlers, brand voice
66
+ - Read `data/business-context.json` — product info, audience, value proposition
67
+ - Read `data/goals.json` — current business goals for relevance
68
+
69
+ 2. **Generate Campaign** based on type:
70
+
71
+ **`welcome`** — First email after signup:
72
+ - Subject line (3 variations)
73
+ - Preview text
74
+ - Body: warm greeting → what they signed up for → what to expect → single CTA
75
+ - Tone: enthusiastic but professional, use brand voice from positioning
76
+ - Include personalization tokens: `{{firstName}}`, `{{source}}`
77
+
78
+ **`onboarding`** — Guide new users to first value:
79
+ - Subject line (3 variations)
80
+ - Body: acknowledge signup → quickstart steps → link to docs → CTA to first action
81
+ - Focus on time-to-value messaging from positioning
82
+ - Include personalization: `{{firstName}}`
83
+
84
+ **`feature-announcement`** — New feature shipped:
85
+ - Subject line (3 variations)
86
+ - Body: what's new → why it matters → how to use it → CTA to try it
87
+ - Pull differentiators from positioning data
88
+ - If $ARGUMENTS includes an idea ID, load that idea for specific feature details
89
+
90
+ **`re-engagement`** — Win back inactive users:
91
+ - Subject line (3 variations)
92
+ - Body: we miss you → what's new since they left → special offer/incentive → CTA
93
+ - Use objection handlers from positioning to address likely reasons for leaving
94
+
95
+ **`milestone`** — Celebrate user achievements:
96
+ - Subject line (3 variations)
97
+ - Body: congratulations → what they achieved → what's next → CTA to share/upgrade
98
+ - Keep it short and celebratory
99
+
100
+ 3. **Write Output**: Save to `data/email-campaigns/{type}-{YYYY-MM-DD}.md` as structured markdown:
101
+ ```markdown
102
+ # {Type} Email Campaign — {Date}
103
+
104
+ ## Metadata
105
+ - Type: {type}
106
+ - Generated: {date}
107
+ - Positioning version: {last_updated from positioning.json}
108
+
109
+ ## Subject Lines
110
+ 1. {subject1}
111
+ 2. {subject2}
112
+ 3. {subject3}
113
+
114
+ ## Preview Text
115
+ {preview}
116
+
117
+ ## Body
118
+
119
+ {full email body in markdown}
120
+
121
+ ## Loops Integration Notes
122
+ - Suggested event trigger: {event_name}
123
+ - Recommended mailing list: {list_name}
124
+ - Personalization tokens used: {list}
125
+ ```
126
+
127
+ 4. **Print Summary**: Preview of subject lines, word count, file path, suggestion to set up in Loops dashboard.
128
+
129
+ ---
130
+
131
+ ### Mode: `sequence {name}`
132
+
133
+ Design a multi-email drip sequence.
134
+
135
+ 1. **Load Context**: Same as campaign mode — positioning, business context, goals.
136
+
137
+ 2. **Design Sequence**:
138
+ - Generate 3-5 emails with recommended timing (e.g., Day 0, Day 2, Day 5, Day 10, Day 14)
139
+ - Each email has: subject line, preview text, body, CTA
140
+ - Map a Loops event name to trigger each email
141
+ - Ensure narrative arc: introduce → educate → demonstrate value → convert → reinforce
142
+
143
+ 3. **Write Output**: Save to `data/email-campaigns/sequences/{name}.md`:
144
+ ```markdown
145
+ # {Name} Email Sequence
146
+
147
+ ## Overview
148
+ - Emails: {count}
149
+ - Duration: {total days}
150
+ - Goal: {sequence goal}
151
+ - Trigger event: {initial trigger}
152
+
153
+ ## Email 1: {title} (Day 0)
154
+ **Trigger:** {event_name}
155
+ **Subject:** {subject}
156
+ **Preview:** {preview}
157
+
158
+ {body}
159
+
160
+ ---
161
+
162
+ ## Email 2: {title} (Day 2)
163
+ ...
164
+ ```
165
+
166
+ 4. **Print Summary**: Sequence overview, timing chart, event names to configure in Loops.
167
+
168
+ ---
169
+
170
+ ### Mode: `blast {slug}`
171
+
172
+ Draft a one-off announcement email.
173
+
174
+ 1. **Load Context**: Positioning data, business context. If slug matches an idea ID in `data/ideas.json`, load that idea for specific details.
175
+
176
+ 2. **Generate Email**:
177
+ - Subject line (3 variations)
178
+ - Preview text
179
+ - Body: announcement → details → why it matters → CTA
180
+ - Keep it concise — one-off emails should be scannable
181
+
182
+ 3. **Write Output**: Save to `data/email-campaigns/blasts/{slug}.md`
183
+
184
+ 4. **Print Summary**: Preview of subject lines, file path.
185
+
186
+ ---
187
+
188
+ ## Directory Structure
189
+
190
+ Ensure these directories exist before writing (create if needed):
191
+ ```
192
+ data/email-campaigns/
193
+ ├── sequences/
194
+ └── blasts/
195
+ ```
196
+
197
+ ## Output Files
198
+ - `data/email-campaigns/{type}-{date}.md` — campaign drafts
199
+ - `data/email-campaigns/sequences/{name}.md` — drip sequences
200
+ - `data/email-campaigns/blasts/{slug}.md` — one-off emails
201
+ - `data/business-context.json` — updated with Loops KPI adapter (setup mode only)
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{733:function(e,t,s){Promise.resolve().then(s.bind(s,6435)),Promise.resolve().then(s.bind(s,1259)),Promise.resolve().then(s.bind(s,7739)),Promise.resolve().then(s.bind(s,275))},6858:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},6221:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},9322:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},1671:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},8124:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]])},1817:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3276:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},6076:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]])},3247:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},4286:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},1239:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},6435:function(e,t,s){"use strict";s.d(t,{default:function(){return g}});var a=s(7437),r=s(9376),l=s(6221),n=s(9205);let i=(0,n.Z)("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),c=(0,n.Z)("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);var d=s(6076),o=s(2265),x=s(1817),m=s(3276),u=s(1671),h=s(9322),p=s(1994);function b(e){let{onAnalysisComplete:t}=e,[s,r]=(0,o.useState)(!1),[l,n]=(0,o.useState)(!1),[i,c]=(0,o.useState)(null),d=async e=>{n(!0),c(null);try{let s=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e})}),a=await s.json();a.success?(c({success:!0,message:"Generated ".concat(a.ideas_count," new ideas")}),null==t||t()):c({success:!1,message:a.error||"Analysis failed"})}catch(e){c({success:!1,message:"Failed to start analysis"})}finally{n(!1),setTimeout(()=>{c(null),r(!1)},3e3)}};return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("button",{onClick:()=>r(!s),disabled:l,className:(0,p.Z)("btn btn-primary gap-2",l&&"opacity-75 cursor-wait"),children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Z,{className:"w-4 h-4 animate-spin"}),(0,a.jsx)("span",{children:"Analyzing..."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Analyze Now"})]})}),s&&!l&&(0,a.jsxs)("div",{className:"absolute right-0 mt-2 w-56 bg-white rounded-lg shadow-lg border border-slate-200 py-2 z-10 animate-slide-in",children:[(0,a.jsxs)("button",{onClick:()=>d("quick"),className:"w-full px-4 py-2 text-left hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("div",{className:"font-medium text-slate-900",children:"Quick Scan"}),(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Recent changes, TODOs, errors"})]}),(0,a.jsxs)("button",{onClick:()=>d("deep"),className:"w-full px-4 py-2 text-left hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("div",{className:"font-medium text-slate-900",children:"Deep Review"}),(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Architecture, tech debt, security"})]}),(0,a.jsxs)("button",{onClick:()=>d("metrics"),className:"w-full px-4 py-2 text-left hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("div",{className:"font-medium text-slate-900",children:"Metrics Review"}),(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Funnels, conversions, drop-offs"})]}),(0,a.jsxs)("button",{onClick:()=>d("seo"),className:"w-full px-4 py-2 text-left hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("div",{className:"font-medium text-slate-900",children:"SEO Audit"}),(0,a.jsx)("div",{className:"text-xs text-slate-500",children:"Blog performance, technical SEO"})]})]}),i&&(0,a.jsx)("div",{className:(0,p.Z)("absolute right-0 mt-2 px-4 py-3 rounded-lg shadow-lg animate-slide-in",i.success?"bg-emerald-50 border border-emerald-200":"bg-red-50 border border-red-200"),children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[i.success?(0,a.jsx)(u.Z,{className:"w-4 h-4 text-emerald-600"}):(0,a.jsx)(h.Z,{className:"w-4 h-4 text-red-600"}),(0,a.jsx)("span",{className:(0,p.Z)("text-sm font-medium",i.success?"text-emerald-800":"text-red-800"),children:i.message})]})})]})}function g(e){let{stats:t}=e,s=(0,r.useRouter)();return(0,a.jsx)("header",{className:"px-6 py-4 bg-white border-b border-slate-200",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900",children:"Idea Dashboard"}),(0,a.jsxs)("div",{className:"flex items-center gap-6 mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[(0,a.jsx)(l.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[t.total," total"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-amber-600",children:[(0,a.jsx)(i,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[t.inbox," in inbox"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-violet-600",children:[(0,a.jsx)(c,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[t.inProgress," in progress"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-emerald-600",children:[(0,a.jsx)(d.Z,{className:"w-4 h-4"}),(0,a.jsxs)("span",{children:[t.shipped," shipped"]})]})]})]}),(0,a.jsx)(b,{onAnalysisComplete:()=>{s.refresh()}})]})})}},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return g}});var a=s(7437),r=s(7648),l=s(9376),n=s(5466),i=s(2048),c=s(8896),d=s(8220),o=s(5621),x=s(8728),m=s(2222),u=s(2023),h=s(1994),p=s(257);let b=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(n.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,a.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})}];function g(e){let{children:t}=e,s=(0,l.usePathname)();return(0,a.jsxs)("div",{className:"min-h-screen flex",children:[(0,a.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,a.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,a.jsx)(m.Z,{className:"w-6 h-6 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,a.jsx)("p",{className:"text-xs text-slate-400",children:p.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,a.jsx)("nav",{className:"flex-1 p-4",children:(0,a.jsx)("ul",{className:"space-y-1",children:b.map(e=>{let t="/"===e.href?"/"===s:s.startsWith(e.href);return(0,a.jsx)("li",{children:(0,a.jsxs)(r.default,{href:e.href,className:(0,h.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",t?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,a.jsx)("span",{children:e.label})]})},e.href)})})}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)(u.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,a.jsx)("main",{className:"flex-1 overflow-auto",children:t})]})}},7739:function(e,t,s){"use strict";s.d(t,{default:function(){return C}});var a=s(7437),r=s(2265),l=s(3247),n=s(9205);let i=(0,n.Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),c=(0,n.Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var d=s(1994),o=s(7648),x=s(9322);let m=(0,n.Z)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var u=s(6858);let h=(0,n.Z)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var p=s(1239);let b=(0,n.Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);var g=s(8896),f=s(4286);let v=(0,n.Z)("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);var j=s(6153);function y(e){let{priority:t}=e;switch(t){case"critical":return(0,a.jsx)(x.Z,{className:"w-3 h-3"});case"high":return(0,a.jsx)(m,{className:"w-3 h-3"});case"medium":return(0,a.jsx)(u.Z,{className:"w-3 h-3"});case"low":return(0,a.jsx)(h,{className:"w-3 h-3"})}}function N(e){let{size:t,label:s}=e;return(0,a.jsx)("span",{className:"size-badge",title:s,children:j.bi[t]})}function w(e){let{idea:t,compact:s=!1}=e,r=t.comments.length>0;return(0,a.jsx)(o.default,{href:"/ideas/".concat(t.id),children:(0,a.jsxs)("div",{className:"idea-card",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("span",{className:(0,d.Z)("priority-badge",j.Gs[t.priority]),children:[(0,a.jsx)(y,{priority:t.priority}),(0,a.jsx)("span",{className:"ml-1",children:j.rF[t.priority]})]}),(0,a.jsx)("span",{className:(0,d.Z)("category-badge",j.pG[t.category]),children:j.Hs[t.category]})]}),(0,a.jsx)("h3",{className:"font-medium text-slate-900 text-sm leading-snug mb-1",children:t.title}),!s&&(0,a.jsx)("p",{className:"text-xs text-slate-500 line-clamp-2 mb-2",children:t.summary}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-2 pt-2 border-t border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",title:"Effort",children:[(0,a.jsx)(p.Z,{className:"w-3 h-3 text-slate-400"}),(0,a.jsx)(N,{size:t.effort,label:"Effort"})]}),(0,a.jsx)("span",{className:"text-slate-300",children:"/"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",title:"Impact",children:[(0,a.jsx)(m,{className:"w-3 h-3 text-slate-400"}),(0,a.jsx)(N,{size:t.impact,label:"Impact"})]})]}),r&&(0,a.jsxs)("div",{className:"flex items-center gap-1 text-slate-400",children:[(0,a.jsx)(b,{className:"w-3 h-3"}),(0,a.jsx)("span",{className:"text-xs",children:t.comments.length})]})]}),t.goal_id&&(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-2 text-emerald-600",children:[(0,a.jsx)(g.Z,{className:"w-3 h-3"}),(0,a.jsx)("span",{className:"text-[10px]",children:"Goal aligned"})]}),"shipped"===t.stage&&t.verification&&"pending"!==t.verification.status&&(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)(f.Z,{className:"w-3 h-3"}),(0,a.jsx)("span",{className:(0,d.Z)("text-[10px] px-1 py-0.5 rounded",j.aR[t.verification.status]),children:j.Wb[t.verification.status]})]}),t.verification_status&&(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)(v,{className:"w-3 h-3"}),(0,a.jsx)("span",{className:(0,d.Z)("text-[10px] px-1 py-0.5 rounded","proceed"===t.verification_status&&"bg-green-100 text-green-700","extend"===t.verification_status&&"bg-blue-100 text-blue-700","investigate"===t.verification_status&&"bg-yellow-100 text-yellow-700","stop"===t.verification_status&&"bg-red-100 text-red-700"),children:t.verification_status.toUpperCase()})]}),!s&&t.tags.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[t.tags.slice(0,3).map(e=>(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 bg-slate-100 text-slate-500 rounded",children:e},e)),t.tags.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-400",children:["+",t.tags.length-3]})]})]})})}let k=["product","ux_design","growth","performance","tech_debt","security","infrastructure","content","analytics","integration"],Z=["critical","high","medium","low"],_=["xs","s","m","l","xl"];function C(e){let{ideas:t}=e,[s,n]=(0,r.useState)({categories:[],priorities:[],efforts:[],search:""}),[o,x]=(0,r.useState)(!1),[m,u]=(0,r.useState)(null),h=(0,r.useMemo)(()=>{let e={all:t.length};return t.forEach(t=>{e[t.category]=(e[t.category]||0)+1}),e},[t]),p=(0,r.useMemo)(()=>t.filter(e=>{if(m&&e.category!==m)return!1;if(s.search){let t=s.search.toLowerCase();if(!(e.title.toLowerCase().includes(t)||e.summary.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))))return!1}return(!(s.categories.length>0)||!!s.categories.includes(e.category))&&(!(s.priorities.length>0)||!!s.priorities.includes(e.priority))&&(!(s.efforts.length>0)||!!s.efforts.includes(e.effort))}),[t,s,m]),b=(0,r.useMemo)(()=>{let e={};return j.G.forEach(t=>{e[t]=[]}),p.forEach(t=>{j.G.includes(t.stage)&&e[t.stage].push(t)}),e},[p]),g=s.categories.length+s.priorities.length+s.efforts.length,f=(e,t)=>{n(s=>{let a=s[e],r=a.includes(t)?a.filter(e=>e!==t):[...a,t];return{...s,[e]:r}})};return(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[(0,a.jsx)("div",{className:"px-6 py-3 bg-slate-50 border-b border-slate-200 overflow-x-auto",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>u(null),className:(0,d.Z)("px-3 py-1.5 text-sm font-medium rounded-full whitespace-nowrap transition-colors",null===m?"bg-slate-800 text-white":"bg-white text-slate-600 hover:bg-slate-100 border border-slate-200"),children:["All",(0,a.jsxs)("span",{className:"ml-1.5 text-xs opacity-70",children:["(",h.all,")"]})]}),k.map(e=>(0,a.jsxs)("button",{onClick:()=>u(e),className:(0,d.Z)("px-3 py-1.5 text-sm font-medium rounded-full whitespace-nowrap transition-colors",m===e?j.pG[e]:"bg-white text-slate-600 hover:bg-slate-100 border border-slate-200"),children:[j.Hs[e],h[e]>0&&(0,a.jsxs)("span",{className:"ml-1.5 text-xs opacity-70",children:["(",h[e],")"]})]},e))]})}),(0,a.jsxs)("div",{className:"px-6 py-4 bg-white border-b border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,a.jsx)(l.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),(0,a.jsx)("input",{type:"text",placeholder:"Search ideas...",value:s.search,onChange:e=>n(t=>({...t,search:e.target.value})),className:"input pl-10"})]}),(0,a.jsxs)("button",{onClick:()=>x(!o),className:(0,d.Z)("btn btn-secondary gap-2",o&&"bg-slate-200"),children:[(0,a.jsx)(i,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Filters"}),g>0&&(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-emerald-500 text-white text-xs rounded-full",children:g})]}),g>0&&(0,a.jsxs)("button",{onClick:()=>{n({categories:[],priorities:[],efforts:[],search:""})},className:"btn btn-ghost gap-1 text-sm",children:[(0,a.jsx)(c,{className:"w-4 h-4"}),"Clear"]})]}),o&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap gap-6 animate-slide-in",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-slate-500 mb-2",children:"Category"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:k.map(e=>(0,a.jsx)("button",{onClick:()=>f("categories",e),className:(0,d.Z)("px-2 py-1 text-xs rounded border transition-colors",s.categories.includes(e)?"bg-emerald-100 border-emerald-300 text-emerald-800":"bg-white border-slate-200 text-slate-600 hover:border-slate-300"),children:j.Hs[e]},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-slate-500 mb-2",children:"Priority"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Z.map(e=>(0,a.jsx)("button",{onClick:()=>f("priorities",e),className:(0,d.Z)("px-2 py-1 text-xs rounded border transition-colors",s.priorities.includes(e)?"bg-emerald-100 border-emerald-300 text-emerald-800":"bg-white border-slate-200 text-slate-600 hover:border-slate-300"),children:j.rF[e]},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-slate-500 mb-2",children:"Effort"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:_.map(e=>(0,a.jsx)("button",{onClick:()=>f("efforts",e),className:(0,d.Z)("px-2 py-1 text-xs rounded border transition-colors",s.efforts.includes(e)?"bg-emerald-100 border-emerald-300 text-emerald-800":"bg-white border-slate-200 text-slate-600 hover:border-slate-300"),children:j.bi[e]},e))})]})]})]}),(0,a.jsx)("div",{className:"flex-1 overflow-x-auto p-6",children:(0,a.jsx)("div",{className:"flex gap-4 h-full min-w-max",children:j.G.map(e=>(0,a.jsxs)("div",{className:"w-72 flex flex-col",children:[(0,a.jsxs)("div",{className:"kanban-column-header",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:(0,d.Z)("stage-indicator",j.lv[e])}),(0,a.jsx)("span",{className:"font-medium text-slate-700",children:j.yb[e]})]}),(0,a.jsx)("span",{className:"text-sm text-slate-400",children:b[e].length})]}),(0,a.jsx)("div",{className:"kanban-column flex-1 overflow-y-auto",children:0===b[e].length?(0,a.jsx)("div",{className:"text-center py-8 text-slate-400 text-sm",children:"No ideas"}):b[e].map(e=>(0,a.jsx)(w,{idea:e},e.id))})]},e))})})]})}},275:function(e,t,s){"use strict";s.d(t,{default:function(){return d}});var a=s(7437),r=s(7648),l=s(8124),n=s(6858),i=s(1994),c=s(6153);function d(e){let{epics:t,progressMap:s}=e;if(0===t.length)return null;let d={active:0,planned:1,paused:2,completed:3},o=[...t].sort((e,t)=>{var s,a;return(null!==(s=d[e.status])&&void 0!==s?s:9)-(null!==(a=d[t.status])&&void 0!==a?a:9)}).slice(0,4),x=t.filter(e=>"active"===e.status).length,m=t.filter(e=>"planned"===e.status).length;return(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Z,{className:"w-4 h-4 text-blue-500"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-slate-900",children:"Roadmap"}),(0,a.jsxs)("span",{className:"text-xs text-slate-400",children:[x," active, ",m," planned"]})]}),(0,a.jsxs)(r.default,{href:"/roadmap",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-700",children:["View all",(0,a.jsx)(n.Z,{className:"w-3 h-3"})]})]}),(0,a.jsx)("div",{className:"space-y-2",children:o.map(e=>{let t=s[e.id]||{total_ideas:0,shipped_count:0,progress_pct:0};return(0,a.jsxs)(r.default,{href:"/roadmap/".concat(e.id),className:"block p-2 rounded-lg hover:bg-slate-50 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-800 truncate flex-1 mr-2",children:e.title}),(0,a.jsx)("span",{className:(0,i.Z)("text-[10px] px-1.5 py-0.5 rounded-full font-medium border whitespace-nowrap",c.xP[e.status]),children:c.GK[e.status]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex-1 h-1.5 bg-slate-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:(0,i.Z)("h-full rounded-full transition-all","completed"===e.status?"bg-emerald-500":"active"===e.status?"bg-blue-500":"bg-slate-300"),style:{width:"".concat(t.progress_pct,"%")}})}),(0,a.jsxs)("span",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:[t.shipped_count,"/",t.total_ideas]})]})]},e.id)})})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return w},Gs:function(){return o},Hs:function(){return a},PW:function(){return y},R$:function(){return v},Vr:function(){return x},Wb:function(){return u},aR:function(){return m},bi:function(){return c},en:function(){return f},i2:function(){return g},kT:function(){return h},l5:function(){return p},lE:function(){return j},lv:function(){return n},pG:function(){return r},rF:function(){return d},tV:function(){return b},tl:function(){return N},xP:function(){return k},yb:function(){return l}});let a={product:"Product",ux_design:"UX/Design",growth:"Growth",performance:"Performance",tech_debt:"Tech Debt",security:"Security",infrastructure:"Infrastructure",content:"Content",analytics:"Analytics",integration:"Integration"},r={product:"bg-blue-100 text-blue-800",ux_design:"bg-purple-100 text-purple-800",growth:"bg-green-100 text-green-800",performance:"bg-orange-100 text-orange-800",tech_debt:"bg-yellow-100 text-yellow-800",security:"bg-red-100 text-red-800",infrastructure:"bg-gray-100 text-gray-800",content:"bg-pink-100 text-pink-800",analytics:"bg-cyan-100 text-cyan-800",integration:"bg-indigo-100 text-indigo-800"},l={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},n={inbox:"bg-amber-500",under_review:"bg-blue-500",approved:"bg-emerald-500",in_progress:"bg-violet-500",testing:"bg-cyan-500",shipped:"bg-green-500",deferred:"bg-gray-500",rejected:"bg-red-500",rolled_back:"bg-orange-500"},i=["inbox","under_review","approved","in_progress","testing","shipped"],c={xs:"XS",s:"S",m:"M",l:"L",xl:"XL"},d={critical:"Critical",high:"High",medium:"Medium",low:"Low"},o={critical:"bg-red-100 text-red-800 border-red-300",high:"bg-orange-100 text-orange-800 border-orange-300",medium:"bg-yellow-100 text-yellow-800 border-yellow-300",low:"bg-gray-100 text-gray-800 border-gray-300"},x={codebase_analysis:"Codebase Analysis",metrics_review:"Metrics Review",market_research:"Market Research",seo_audit:"SEO Audit",manual:"Manual"},m={pending:"bg-slate-100 text-slate-700",validated:"bg-emerald-100 text-emerald-800",needs_investigation:"bg-amber-100 text-amber-800",inconclusive:"bg-slate-100 text-slate-600",invalidated:"bg-red-100 text-red-800"},u={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},h={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},p={acquisition:"bg-blue-100 text-blue-800",activation:"bg-emerald-100 text-emerald-800",retention:"bg-purple-100 text-purple-800",revenue:"bg-amber-100 text-amber-800",referral:"bg-pink-100 text-pink-800"},b={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},g={on_track:"bg-emerald-100 text-emerald-800 border-emerald-300",at_risk:"bg-amber-100 text-amber-800 border-amber-300",behind:"bg-red-100 text-red-800 border-red-300",achieved:"bg-blue-100 text-blue-800 border-blue-300"},f={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},v={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},j={stated:"bg-slate-100 text-slate-800 border-slate-300",testing:"bg-amber-100 text-amber-800 border-amber-300",validated:"bg-emerald-100 text-emerald-800 border-emerald-300",invalidated:"bg-red-100 text-red-800 border-red-300",deferred:"bg-slate-100 text-slate-500 border-slate-200"},y={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},N={acquisition:"bg-blue-100 text-blue-800",engagement:"bg-purple-100 text-purple-800",conversion:"bg-amber-100 text-amber-800",monetization:"bg-emerald-100 text-emerald-800"},w={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},k={planned:"bg-slate-100 text-slate-700 border-slate-300",active:"bg-blue-100 text-blue-800 border-blue-300",completed:"bg-emerald-100 text-emerald-800 border-emerald-300",paused:"bg-amber-100 text-amber-800 border-amber-300"}}},function(e){e.O(0,[783,971,117,744],function(){return e(e.s=733)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25],{9375:function(e,t,a){Promise.resolve().then(a.bind(a,9653))},2660:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},505:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},6362:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},8124:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]])},5846:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(9205).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},9653:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return m}});var s=a(7437),r=a(2265),n=a(7648),l=a(2660),i=a(8124),d=a(5846),c=a(8896),o=a(505),x=a(6362),u=a(1994),h=a(1259),p=a(6153);function m(e){let{params:t}=e,{id:a}=t,[m,b]=(0,r.useState)(null),[g,f]=(0,r.useState)([]),[j,v]=(0,r.useState)(null),[N,y]=(0,r.useState)(!0),[w,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{!async function(){try{let e=await fetch("/api/epics/".concat(a)),t=await e.json();if(!t.success){_(t.error||"Failed to load epic");return}if(b(t.data),t.data.idea_ids.length>0){let e=await fetch("/api/ideas"),a=await e.json();if(a.success){let e=t.data.idea_ids.map(e=>a.data.find(t=>t.id===e)).filter(Boolean);f(e)}}if(t.data.goal_id){let e=await fetch("/api/goals/".concat(t.data.goal_id)),a=await e.json();a.success&&v(a.data)}}catch(e){_("Failed to load epic"),console.error("Error fetching epic:",e)}finally{y(!1)}}()},[a]);let k=async e=>{try{let t=await fetch("/api/epics/".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e,status_override:!0})}),s=await t.json();s.success&&b(s.data)}catch(e){console.error("Failed to update status:",e)}};return N?(0,s.jsx)(h.default,{children:(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-blue-500 rounded-full animate-spin"})})}):w||!m?(0,s.jsx)(h.default,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)(n.default,{href:"/roadmap",className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[(0,s.jsx)(l.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Back to Roadmap"})]}),(0,s.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center",children:(0,s.jsx)("p",{className:"text-red-600",children:w||"Epic not found"})})]})}):(0,s.jsx)(h.default,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)(n.default,{href:"/roadmap",className:"inline-flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-6",children:[(0,s.jsx)(l.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Back to Roadmap"})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-6",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,s.jsxs)("div",{className:"flex items-start gap-4",children:[(0,s.jsx)("div",{className:"w-14 h-14 bg-blue-100 rounded-xl flex items-center justify-center flex-shrink-0",children:(0,s.jsx)(i.Z,{className:"w-7 h-7 text-blue-600"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,s.jsx)("span",{className:(0,u.Z)("text-xs px-2 py-0.5 rounded-full",p.pG[m.category]),children:p.Hs[m.category]})}),(0,s.jsx)("h1",{className:"text-2xl font-bold text-slate-900 mb-1",children:m.title}),(0,s.jsx)("p",{className:"text-slate-500",children:m.description})]})]}),(0,s.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(0,s.jsx)("span",{className:(0,u.Z)("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm font-medium border",p.xP[m.status]),children:p.GK[m.status]}),(0,s.jsxs)("select",{value:m.status,onChange:e=>k(e.target.value),className:"text-xs border border-slate-200 rounded px-2 py-1 text-slate-600",children:[(0,s.jsx)("option",{value:"planned",children:"Planned"}),(0,s.jsx)("option",{value:"active",children:"Active"}),(0,s.jsx)("option",{value:"completed",children:"Completed"}),(0,s.jsx)("option",{value:"paused",children:"Paused"})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-6 text-sm text-slate-500 mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(d.Z,{className:"w-4 h-4"}),(0,s.jsxs)("span",{children:[m.idea_ids.length," ideas"]})]}),j&&(0,s.jsxs)(n.default,{href:"/goals/".concat(j.id),className:"flex items-center gap-2 text-emerald-600 hover:text-emerald-700",children:[(0,s.jsx)(c.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:j.title})]})]}),(0,s.jsxs)("div",{className:"flex items-start gap-4 mb-4",children:[(0,s.jsx)(o.Z,{className:"w-4 h-4 text-slate-400 mt-2"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-slate-500 mb-1",children:"Target Start"}),(0,s.jsx)("input",{type:"date",value:m.target_start||"",onChange:async e=>{let t=e.target.value||null;try{let e=await fetch("/api/epics/".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({target_start:t})}),s=await e.json();s.success&&b(s.data)}catch(e){console.error("Failed to update target_start:",e)}},className:"text-sm border border-slate-200 rounded px-2 py-1 text-slate-700"}),!m.target_start&&(0,s.jsx)("span",{className:"text-[10px] text-slate-400 block mt-0.5",children:"auto-estimated"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-slate-500 mb-1",children:"Target End"}),(0,s.jsx)("input",{type:"date",value:m.target_end||"",onChange:async e=>{let t=e.target.value||null;try{let e=await fetch("/api/epics/".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({target_end:t})}),s=await e.json();s.success&&b(s.data)}catch(e){console.error("Failed to update target_end:",e)}},className:"text-sm border border-slate-200 rounded px-2 py-1 text-slate-700"}),!m.target_end&&(0,s.jsx)("span",{className:"text-[10px] text-slate-400 block mt-0.5",children:"auto-estimated"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("span",{className:"text-xs text-slate-500",children:[m.progress.shipped_count,"/",m.progress.total_ideas," ideas shipped"]}),(0,s.jsxs)("span",{className:"text-xs font-medium text-slate-700",children:[m.progress.progress_pct,"%"]})]}),(0,s.jsx)("div",{className:"relative h-2 bg-slate-100 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:(0,u.Z)("absolute left-0 top-0 h-full rounded-full transition-all duration-500","completed"===m.status?"bg-emerald-500":"active"===m.status?"bg-blue-500":"bg-slate-300"),style:{width:"".concat(m.progress.progress_pct,"%")}})}),m.progress.effort_total>0&&(0,s.jsxs)("p",{className:"text-xs text-slate-400 mt-1",children:["Effort: ",m.progress.effort_completed,"/",m.progress.effort_total," points completed"]})]})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg border border-slate-200",children:[(0,s.jsx)("div",{className:"px-6 py-4 border-b border-slate-200",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Ideas (",g.length,")"]})}),g.length>0?(0,s.jsx)("div",{className:"divide-y divide-slate-100",children:g.map((e,t)=>(0,s.jsxs)(n.default,{href:"/ideas/".concat(e.id),className:"flex items-center gap-4 px-6 py-3 hover:bg-slate-50 transition-colors",children:[(0,s.jsx)("span",{className:"text-xs text-slate-400 w-6 text-center",children:t+1}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-slate-900 truncate",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-slate-500 truncate",children:e.summary})]}),(0,s.jsx)("span",{className:(0,u.Z)("text-xs px-2 py-0.5 rounded-full text-white",p.lv[e.stage]),children:p.yb[e.stage]}),(0,s.jsx)("span",{className:"text-xs text-slate-400 w-8 text-center",children:p.bi[e.effort]}),(0,s.jsx)(x.Z,{className:"w-4 h-4 text-slate-300 flex-shrink-0"})]},e.id))}):(0,s.jsxs)("div",{className:"p-8 text-center",children:[(0,s.jsx)(d.Z,{className:"w-8 h-8 text-slate-300 mx-auto mb-2"}),(0,s.jsx)("p",{className:"text-sm text-slate-500",children:"No ideas in this epic yet. Add ideas via the API."})]})]}),(0,s.jsxs)("div",{className:"mt-6 text-xs text-slate-400",children:[(0,s.jsxs)("p",{children:["Created: ",new Date(m.created_at).toLocaleString()]}),(0,s.jsxs)("p",{children:["Last updated: ",new Date(m.updated_at).toLocaleString()]})]})]})})}},1259:function(e,t,a){"use strict";a.d(t,{default:function(){return g}});var s=a(7437),r=a(7648),n=a(9376),l=a(5466),i=a(2048),d=a(8896),c=a(8220),o=a(5621),x=a(8728),u=a(2222),h=a(2023),p=a(1994),m=a(257);let b=[{href:"/",label:"Dashboard",icon:(0,s.jsx)(l.Z,{className:"w-5 h-5"})},{href:"/roadmap",label:"Roadmap",icon:(0,s.jsx)(i.Z,{className:"w-5 h-5"})},{href:"/goals",label:"Goals",icon:(0,s.jsx)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,s.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,s.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,s.jsx)(x.Z,{className:"w-5 h-5"})}];function g(e){let{children:t}=e,a=(0,n.usePathname)();return(0,s.jsxs)("div",{className:"min-h-screen flex",children:[(0,s.jsxs)("aside",{className:"w-64 bg-slate-900 text-white flex flex-col",children:[(0,s.jsx)("div",{className:"p-4 border-b border-slate-700",children:(0,s.jsxs)(r.default,{href:"/",className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-emerald-500 rounded-lg flex items-center justify-center",children:(0,s.jsx)(u.Z,{className:"w-6 h-6 text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"font-bold text-lg leading-tight",children:"Analyst"}),(0,s.jsx)("p",{className:"text-xs text-slate-400",children:m.env.NEXT_PUBLIC_PRODUCT_NAME||"Business"})]})]})}),(0,s.jsx)("nav",{className:"flex-1 p-4",children:(0,s.jsx)("ul",{className:"space-y-1",children:b.map(e=>{let t="/"===e.href?"/"===a:a.startsWith(e.href);return(0,s.jsx)("li",{children:(0,s.jsxs)(r.default,{href:e.href,className:(0,p.Z)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors",t?"bg-slate-800 text-white":"text-slate-400 hover:text-white hover:bg-slate-800"),children:[e.icon,(0,s.jsx)("span",{children:e.label})]})},e.href)})})}),(0,s.jsx)("div",{className:"p-4 border-t border-slate-700",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[(0,s.jsx)(h.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Powered by Claude"})]})})]}),(0,s.jsx)("main",{className:"flex-1 overflow-auto",children:t})]})}},6153:function(e,t,a){"use strict";a.d(t,{G:function(){return i},GK:function(){return w},Gs:function(){return o},Hs:function(){return s},PW:function(){return N},R$:function(){return j},Vr:function(){return x},Wb:function(){return h},aR:function(){return u},bi:function(){return d},en:function(){return f},i2:function(){return g},kT:function(){return p},l5:function(){return m},lE:function(){return v},lv:function(){return l},pG:function(){return r},rF:function(){return c},tV:function(){return b},tl:function(){return y},xP:function(){return _},yb:function(){return n}});let s={product:"Product",ux_design:"UX/Design",growth:"Growth",performance:"Performance",tech_debt:"Tech Debt",security:"Security",infrastructure:"Infrastructure",content:"Content",analytics:"Analytics",integration:"Integration"},r={product:"bg-blue-100 text-blue-800",ux_design:"bg-purple-100 text-purple-800",growth:"bg-green-100 text-green-800",performance:"bg-orange-100 text-orange-800",tech_debt:"bg-yellow-100 text-yellow-800",security:"bg-red-100 text-red-800",infrastructure:"bg-gray-100 text-gray-800",content:"bg-pink-100 text-pink-800",analytics:"bg-cyan-100 text-cyan-800",integration:"bg-indigo-100 text-indigo-800"},n={inbox:"Inbox",under_review:"Under Review",approved:"Approved",in_progress:"In Progress",testing:"Testing",shipped:"Shipped",deferred:"Deferred",rejected:"Rejected",rolled_back:"Rolled Back"},l={inbox:"bg-amber-500",under_review:"bg-blue-500",approved:"bg-emerald-500",in_progress:"bg-violet-500",testing:"bg-cyan-500",shipped:"bg-green-500",deferred:"bg-gray-500",rejected:"bg-red-500",rolled_back:"bg-orange-500"},i=["inbox","under_review","approved","in_progress","testing","shipped"],d={xs:"XS",s:"S",m:"M",l:"L",xl:"XL"},c={critical:"Critical",high:"High",medium:"Medium",low:"Low"},o={critical:"bg-red-100 text-red-800 border-red-300",high:"bg-orange-100 text-orange-800 border-orange-300",medium:"bg-yellow-100 text-yellow-800 border-yellow-300",low:"bg-gray-100 text-gray-800 border-gray-300"},x={codebase_analysis:"Codebase Analysis",metrics_review:"Metrics Review",market_research:"Market Research",seo_audit:"SEO Audit",manual:"Manual"},u={pending:"bg-slate-100 text-slate-700",validated:"bg-emerald-100 text-emerald-800",needs_investigation:"bg-amber-100 text-amber-800",inconclusive:"bg-slate-100 text-slate-600",invalidated:"bg-red-100 text-red-800"},h={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},p={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},m={acquisition:"bg-blue-100 text-blue-800",activation:"bg-emerald-100 text-emerald-800",retention:"bg-purple-100 text-purple-800",revenue:"bg-amber-100 text-amber-800",referral:"bg-pink-100 text-pink-800"},b={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},g={on_track:"bg-emerald-100 text-emerald-800 border-emerald-300",at_risk:"bg-amber-100 text-amber-800 border-amber-300",behind:"bg-red-100 text-red-800 border-red-300",achieved:"bg-blue-100 text-blue-800 border-blue-300"},f={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},j={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},v={stated:"bg-slate-100 text-slate-800 border-slate-300",testing:"bg-amber-100 text-amber-800 border-amber-300",validated:"bg-emerald-100 text-emerald-800 border-emerald-300",invalidated:"bg-red-100 text-red-800 border-red-300",deferred:"bg-slate-100 text-slate-500 border-slate-200"},N={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},y={acquisition:"bg-blue-100 text-blue-800",engagement:"bg-purple-100 text-purple-800",conversion:"bg-amber-100 text-amber-800",monetization:"bg-emerald-100 text-emerald-800"},w={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},_={planned:"bg-slate-100 text-slate-700 border-slate-300",active:"bg-blue-100 text-blue-800 border-blue-300",completed:"bg-emerald-100 text-emerald-800 border-emerald-300",paused:"bg-amber-100 text-amber-800 border-amber-300"}}},function(e){e.O(0,[783,971,117,744],function(){return e(e.s=9375)}),_N_E=e.O()}]);