vibebusiness 1.2.46 → 1.2.49
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.
- package/.next/standalone/.env +5 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +17 -17
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
- package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/page.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/social/page.js +1 -1
- package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/social.html +1 -1
- package/.next/standalone/.next/server/app/social.rsc +3 -3
- package/.next/standalone/.next/server/app-paths-manifest.json +13 -13
- package/.next/standalone/.next/server/chunks/3644.js +1 -1
- package/.next/standalone/.next/server/chunks/{7809.js → 3794.js} +103 -2
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/data/business-context.json +7 -4
- package/.next/standalone/data/copy/landing-landing-page-2026-02-20.md +1 -1
- package/.next/standalone/data/heartbeat-sessions.json +211 -10
- package/.next/standalone/data/hypotheses.json +2 -2
- package/.next/standalone/data/ideas.json +958 -449
- package/.next/standalone/data/implementations.json +136 -2
- package/.next/standalone/data/positioning.json +1 -1
- package/.next/standalone/data/reports/visuals/promo-launch.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-ship-fast.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-while-you-slept-v2.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-while-you-slept-v3.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-while-you-slept.png +0 -0
- package/.next/standalone/package.json +2 -2
- package/.next/standalone/scripts/analyze.ts +2 -2
- package/.next/standalone/scripts/implement.ts +5 -5
- package/.next/standalone/scripts/skills/social-media.ts +310 -9
- package/.next/static/chunks/{444-125b7b0fa8cbdb81.js → 444-1826396aef4dab2f.js} +1 -1
- package/.next/static/chunks/app/hypotheses/[id]/{page-65032da79ae146c5.js → page-8999ee91b824d378.js} +1 -1
- package/.next/static/chunks/app/hypotheses/page-6206bce440c44569.js +1 -0
- package/.next/static/chunks/app/ideas/[id]/{page-dc9746061e58eea5.js → page-89e3625db9017166.js} +1 -1
- package/.next/static/chunks/app/{page-fb66ff080390f20a.js → page-8ba52ac74c75461b.js} +1 -1
- package/.next/static/chunks/app/roadmap/[id]/{page-c8c4baf233e0d480.js → page-f437e783039534c4.js} +1 -1
- package/.next/static/chunks/app/roadmap/{page-b15554a207ed2813.js → page-6177b8774b4af79f.js} +1 -1
- package/.next/static/chunks/app/social/{page-6c61fb0c2546313e.js → page-69e480936711ccf2.js} +1 -1
- package/README.md +1 -1
- package/dist/bin/vibebusiness.js +22 -0
- package/dist/scripts/analyze.js +4 -3
- package/dist/scripts/chat.js +10 -2
- package/dist/scripts/generate-idea.js +1 -0
- package/dist/scripts/heartbeat.js +2265 -653
- package/dist/scripts/implement.js +5 -4
- package/dist/scripts/init.js +5 -0
- package/dist/scripts/scan.js +2 -1
- package/package.json +2 -2
- package/templates/commands/setup-posthog.md +116 -0
- package/.next/static/chunks/app/hypotheses/page-8314da4be7c533bd.js +0 -1
- /package/.next/static/{Tko0dnk2wKPorUxfNnm0x → zIIaTqrawBK1MmHg37JOr}/_buildManifest.js +0 -0
- /package/.next/static/{Tko0dnk2wKPorUxfNnm0x → zIIaTqrawBK1MmHg37JOr}/_ssgManifest.js +0 -0
package/.next/static/chunks/app/social/{page-6c61fb0c2546313e.js → page-69e480936711ccf2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{337:function(e,t,s){Promise.resolve().then(s.bind(s,2612))},401:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},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"}]])},6362:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(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"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4743:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]])},8930:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},2489:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},2612:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return v}});var a=s(7437),r=s(2265),n=s(9397),l=s(7168),i=s(9322),d=s(9205);let c=(0,d.Z)("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);var o=s(4743),x=s(1259),u=s(2489),m=s(401),h=s(6362);let b=(0,d.Z)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var p=s(8930),g=s(1994),f=s(6153);function j(e){let{draft:t,onPublish:s,onEdit:n,onDiscard:l}=e,[i,d]=(0,r.useState)(!1),[c,x]=(0,r.useState)(t.text),[j,v]=(0,r.useState)(!1),y=i?c.length:t.text.length,N=y>280,w="draft"===t.status;async function k(){v(!0);try{await s(t.id)}finally{v(!1)}}async function _(){if(!N&&c.trim()){v(!0);try{await n(t.id,c),d(!1)}finally{v(!1)}}}async function Z(){v(!0);try{await l(t.id)}finally{v(!1)}}return(0,a.jsxs)("div",{className:(0,g.Z)("border rounded-lg p-4 transition-colors",w?"bg-white border-slate-200":"bg-slate-50 border-slate-100"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:(0,g.Z)("text-xs px-2 py-0.5 rounded-full font-medium",f.Q_[t.source]),children:f.PN[t.source]}),(0,a.jsx)("span",{className:"text-xs text-slate-400",children:new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]}),i?(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("textarea",{value:c,onChange:e=>x(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,maxLength:300}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",N?"text-red-500 font-medium":"text-slate-400"),children:[y,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{d(!1),x(t.text)},className:"text-xs text-slate-500 hover:text-slate-700 flex items-center gap-1",disabled:j,children:[(0,a.jsx)(u.Z,{className:"w-3 h-3"})," Cancel"]}),(0,a.jsxs)("button",{onClick:_,className:"text-xs text-blue-600 hover:text-blue-800 flex items-center gap-1 disabled:opacity-50",disabled:j||N||!c.trim(),children:[(0,a.jsx)(m.Z,{className:"w-3 h-3"})," Save"]})]})]})]}):(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"text-sm text-slate-800 whitespace-pre-wrap leading-relaxed",children:t.text}),w&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",y>260?"text-amber-500":"text-slate-400"),children:[y,"/280"]})})]}),"published"===t.status&&t.tweet_url&&(0,a.jsxs)("a",{href:t.tweet_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1 mb-3",children:[(0,a.jsx)(h.Z,{className:"w-3 h-3"}),"View on X"]}),w&&!i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-slate-100",children:[(0,a.jsxs)("button",{onClick:k,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-xs rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:j,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),j?"Publishing...":"Publish"]}),(0,a.jsxs)("button",{onClick:()=>d(!0),className:"flex items-center gap-1.5 px-3 py-1.5 border border-slate-200 text-slate-600 text-xs rounded-md hover:bg-slate-50 disabled:opacity-50 transition-colors",disabled:j,children:[(0,a.jsx)(b,{className:"w-3 h-3"}),"Edit"]}),(0,a.jsxs)("button",{onClick:Z,className:"flex items-center gap-1.5 px-3 py-1.5 text-red-500 text-xs rounded-md hover:bg-red-50 disabled:opacity-50 transition-colors ml-auto",disabled:j,children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),"Discard"]})]})]})}function v(){var e;let[t,s]=(0,r.useState)(null),[d,u]=(0,r.useState)(!0),[m,h]=(0,r.useState)(null),[b,p]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),N=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/social"),t=await e.json();t.success?(s(t.data),h(null)):h(t.error||"Failed to load social data")}catch(e){h("Failed to connect to server")}finally{u(!1)}},[]);async function w(e){let t=await fetch("/api/social/".concat(e,"/publish"),{method:"POST"}),s=await t.json();if(!s.success){alert(s.error||"Failed to publish");return}await N()}async function k(e,t){let s=await fetch("/api/social/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t})}),a=await s.json();if(!a.success){alert(a.error||"Failed to update");return}await N()}async function _(e){let t=await fetch("/api/social/".concat(e),{method:"DELETE"}),s=await t.json();if(!s.success){alert(s.error||"Failed to discard");return}await N()}async function Z(){if(g.trim()&&!(g.length>280)){y(!0);try{let e=await fetch("/api/social",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:g})}),t=await e.json();t.success?(f(""),p(!1),await N()):alert(t.error||"Failed to create draft")}finally{y(!1)}}}(0,r.useEffect)(()=>{N()},[N]);let C=(null==t?void 0:t.drafts.filter(e=>"draft"===e.status))||[],S=(null==t?void 0:t.drafts.filter(e=>"published"===e.status).sort((e,t)=>(t.published_at||"").localeCompare(e.published_at||"")))||[];return(0,a.jsx)(x.default,{children:(0,a.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900",children:"Social Media"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"Review and publish tweet drafts for your build-in-public journey."})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>p(!0),className:"flex items-center gap-1.5 px-3 py-2 bg-slate-900 text-white text-sm rounded-lg hover:bg-slate-800 transition-colors",children:[(0,a.jsx)(n.Z,{className:"w-4 h-4"}),"New Draft"]}),(0,a.jsx)("button",{onClick:()=>{u(!0),N()},className:"p-2 text-slate-400 hover:text-slate-600 transition-colors",title:"Refresh",children:(0,a.jsx)(l.Z,{className:"w-4 h-4 ".concat(d?"animate-spin":"")})})]})]}),t&&!t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg flex items-start gap-3",children:[(0,a.jsx)(i.Z,{className:"w-5 h-5 text-amber-500 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800",children:"X/Twitter not connected"}),(0,a.jsxs)("p",{className:"text-xs text-amber-600 mt-1",children:["Add X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, and X_ACCESS_SECRET to your .env file, then run the ",(0,a.jsx)("code",{className:"bg-amber-100 px-1 rounded",children:"social-setup-x"})," task."]})]})]}),t&&t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 grid grid-cols-4 gap-4",children:[(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Account"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.username||"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Followers"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:null!==(e=t.metrics.followers_count)&&void 0!==e?e:"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsxs)("p",{className:"text-xs text-slate-500 flex items-center justify-center gap-1",children:[(0,a.jsx)(c,{className:"w-3 h-3"})," Streak"]}),(0,a.jsxs)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:[t.metrics.post_streak_days," day",1!==t.metrics.post_streak_days?"s":""]})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Total Posts"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.total_posts})]})]}),b&&(0,a.jsxs)("div",{className:"mb-6 bg-white border border-slate-200 rounded-lg p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900 mb-2",children:"Compose Tweet"}),(0,a.jsx)("textarea",{value:g,onChange:e=>f(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,placeholder:"What's happening with your product?",maxLength:300,autoFocus:!0}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,a.jsxs)("span",{className:"text-xs ".concat(g.length>280?"text-red-500 font-medium":"text-slate-400"),children:[g.length,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>{p(!1),f("")},className:"px-3 py-1.5 text-sm text-slate-500 hover:text-slate-700",children:"Cancel"}),(0,a.jsxs)("button",{onClick:Z,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-sm rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:v||!g.trim()||g.length>280,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),"Save Draft"]})]})]})]}),d&&!t&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(l.Z,{className:"w-6 h-6 animate-spin text-slate-400 mx-auto"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-2",children:"Loading drafts..."})]}),m&&(0,a.jsx)("div",{className:"text-center py-12",children:(0,a.jsx)("p",{className:"text-sm text-red-500",children:m})}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Drafts (",C.length,")"]})}),0===C.length?(0,a.jsx)("div",{className:"text-center py-8 bg-slate-50 rounded-lg border border-dashed border-slate-200",children:(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"No pending drafts. The heartbeat will generate drafts as you ship features and hit milestones."})}):(0,a.jsx)("div",{className:"space-y-3 mb-8",children:C.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))}),S.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 mt-8",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Published (",S.length,")"]})}),(0,a.jsx)("div",{className:"space-y-3",children:S.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))})]})]})]})})}},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(7648),n=s(9376),l=s(5466),i=s(2048),d=s(8896),c=s(8220),o=s(2718),x=s(5621),u=s(8728),m=s(2222),h=s(2023),b=s(1994),p=s(257);let g=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(l.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)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(u.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,s=(0,n.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:g.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,b.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)(h.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})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return _},Gs:function(){return o},Hs:function(){return a},PN:function(){return h},PW:function(){return w},Q_:function(){return b},R$:function(){return y},Vr:function(){return x},Wb:function(){return m},aR:function(){return u},bi:function(){return d},en:function(){return v},i2:function(){return j},kT:function(){return p},l5:function(){return g},lE:function(){return N},lv:function(){return l},pG:function(){return r},rF:function(){return c},tV:function(){return f},tl:function(){return k},xP:function(){return Z},yb:function(){return n}});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"},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"},m={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},h={ship:"Ship",update:"Update",milestone:"Milestone",digest:"Digest",manual:"Manual"},b={ship:"bg-green-100 text-green-800",update:"bg-blue-100 text-blue-800",milestone:"bg-amber-100 text-amber-800",digest:"bg-purple-100 text-purple-800",manual:"bg-slate-100 text-slate-800"},p={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},g={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"},f={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},j={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"},v={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},y={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},N={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"},w={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},k={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"},_={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},Z={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,[746,971,117,744],function(){return e(e.s=337)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{337:function(e,t,s){Promise.resolve().then(s.bind(s,2612))},401:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},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"}]])},6362:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(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"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7168:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4743:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]])},8930:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},2489:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(9205).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},2612:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return v}});var a=s(7437),r=s(2265),n=s(9397),l=s(7168),i=s(9322),d=s(9205);let c=(0,d.Z)("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);var o=s(4743),x=s(1259),u=s(2489),m=s(401),h=s(6362);let b=(0,d.Z)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);var p=s(8930),g=s(1994),f=s(6153);function j(e){let{draft:t,onPublish:s,onEdit:n,onDiscard:l}=e,[i,d]=(0,r.useState)(!1),[c,x]=(0,r.useState)(t.text),[j,v]=(0,r.useState)(!1),y=i?c.length:t.text.length,N=y>280,w="draft"===t.status;async function k(){v(!0);try{await s(t.id)}finally{v(!1)}}async function _(){if(!N&&c.trim()){v(!0);try{await n(t.id,c),d(!1)}finally{v(!1)}}}async function Z(){v(!0);try{await l(t.id)}finally{v(!1)}}return(0,a.jsxs)("div",{className:(0,g.Z)("border rounded-lg p-4 transition-colors",w?"bg-white border-slate-200":"bg-slate-50 border-slate-100"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("span",{className:(0,g.Z)("text-xs px-2 py-0.5 rounded-full font-medium",f.Q_[t.source]),children:f.PN[t.source]}),(0,a.jsx)("span",{className:"text-xs text-slate-400",children:new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]}),i?(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("textarea",{value:c,onChange:e=>x(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,maxLength:300}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",N?"text-red-500 font-medium":"text-slate-400"),children:[y,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("button",{onClick:()=>{d(!1),x(t.text)},className:"text-xs text-slate-500 hover:text-slate-700 flex items-center gap-1",disabled:j,children:[(0,a.jsx)(u.Z,{className:"w-3 h-3"})," Cancel"]}),(0,a.jsxs)("button",{onClick:_,className:"text-xs text-blue-600 hover:text-blue-800 flex items-center gap-1 disabled:opacity-50",disabled:j||N||!c.trim(),children:[(0,a.jsx)(m.Z,{className:"w-3 h-3"})," Save"]})]})]})]}):(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"text-sm text-slate-800 whitespace-pre-wrap leading-relaxed",children:t.text}),w&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)("span",{className:(0,g.Z)("text-xs",y>260?"text-amber-500":"text-slate-400"),children:[y,"/280"]})})]}),"published"===t.status&&t.tweet_url&&(0,a.jsxs)("a",{href:t.tweet_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1 mb-3",children:[(0,a.jsx)(h.Z,{className:"w-3 h-3"}),"View on X"]}),w&&!i&&(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-slate-100",children:[(0,a.jsxs)("button",{onClick:k,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-xs rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:j,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),j?"Publishing...":"Publish"]}),(0,a.jsxs)("button",{onClick:()=>d(!0),className:"flex items-center gap-1.5 px-3 py-1.5 border border-slate-200 text-slate-600 text-xs rounded-md hover:bg-slate-50 disabled:opacity-50 transition-colors",disabled:j,children:[(0,a.jsx)(b,{className:"w-3 h-3"}),"Edit"]}),(0,a.jsxs)("button",{onClick:Z,className:"flex items-center gap-1.5 px-3 py-1.5 text-red-500 text-xs rounded-md hover:bg-red-50 disabled:opacity-50 transition-colors ml-auto",disabled:j,children:[(0,a.jsx)(p.Z,{className:"w-3 h-3"}),"Discard"]})]})]})}function v(){var e;let[t,s]=(0,r.useState)(null),[d,u]=(0,r.useState)(!0),[m,h]=(0,r.useState)(null),[b,p]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),N=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/social"),t=await e.json();t.success?(s(t.data),h(null)):h(t.error||"Failed to load social data")}catch(e){h("Failed to connect to server")}finally{u(!1)}},[]);async function w(e){let t=await fetch("/api/social/".concat(e,"/publish"),{method:"POST"}),s=await t.json();if(!s.success){alert(s.error||"Failed to publish");return}await N()}async function k(e,t){let s=await fetch("/api/social/".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t})}),a=await s.json();if(!a.success){alert(a.error||"Failed to update");return}await N()}async function _(e){let t=await fetch("/api/social/".concat(e),{method:"DELETE"}),s=await t.json();if(!s.success){alert(s.error||"Failed to discard");return}await N()}async function Z(){if(g.trim()&&!(g.length>280)){y(!0);try{let e=await fetch("/api/social",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:g})}),t=await e.json();t.success?(f(""),p(!1),await N()):alert(t.error||"Failed to create draft")}finally{y(!1)}}}(0,r.useEffect)(()=>{N()},[N]);let C=(null==t?void 0:t.drafts.filter(e=>"draft"===e.status))||[],S=(null==t?void 0:t.drafts.filter(e=>"published"===e.status).sort((e,t)=>(t.published_at||"").localeCompare(e.published_at||"")))||[];return(0,a.jsx)(x.default,{children:(0,a.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-slate-900",children:"Social Media"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"Review and publish tweet drafts for your build-in-public journey."})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>p(!0),className:"flex items-center gap-1.5 px-3 py-2 bg-slate-900 text-white text-sm rounded-lg hover:bg-slate-800 transition-colors",children:[(0,a.jsx)(n.Z,{className:"w-4 h-4"}),"New Draft"]}),(0,a.jsx)("button",{onClick:()=>{u(!0),N()},className:"p-2 text-slate-400 hover:text-slate-600 transition-colors",title:"Refresh",children:(0,a.jsx)(l.Z,{className:"w-4 h-4 ".concat(d?"animate-spin":"")})})]})]}),t&&!t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg flex items-start gap-3",children:[(0,a.jsx)(i.Z,{className:"w-5 h-5 text-amber-500 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-800",children:"X/Twitter not connected"}),(0,a.jsxs)("p",{className:"text-xs text-amber-600 mt-1",children:["Add X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, and X_ACCESS_SECRET to your .env file, then run the ",(0,a.jsx)("code",{className:"bg-amber-100 px-1 rounded",children:"social-setup-x"})," task."]})]})]}),t&&t.metrics.credentials_valid&&(0,a.jsxs)("div",{className:"mb-6 grid grid-cols-4 gap-4",children:[(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Account"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.username||"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Followers"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:null!==(e=t.metrics.followers_count)&&void 0!==e?e:"—"})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsxs)("p",{className:"text-xs text-slate-500 flex items-center justify-center gap-1",children:[(0,a.jsx)(c,{className:"w-3 h-3"})," Streak"]}),(0,a.jsxs)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:[t.metrics.post_streak_days," day",1!==t.metrics.post_streak_days?"s":""]})]}),(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-lg p-3 text-center",children:[(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"Total Posts"}),(0,a.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:t.metrics.total_posts})]})]}),b&&(0,a.jsxs)("div",{className:"mb-6 bg-white border border-slate-200 rounded-lg p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900 mb-2",children:"Compose Tweet"}),(0,a.jsx)("textarea",{value:g,onChange:e=>f(e.target.value),className:"w-full border border-slate-300 rounded-md p-3 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500",rows:4,placeholder:"What's happening with your product?",maxLength:300,autoFocus:!0}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,a.jsxs)("span",{className:"text-xs ".concat(g.length>280?"text-red-500 font-medium":"text-slate-400"),children:[g.length,"/280"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>{p(!1),f("")},className:"px-3 py-1.5 text-sm text-slate-500 hover:text-slate-700",children:"Cancel"}),(0,a.jsxs)("button",{onClick:Z,className:"flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 text-white text-sm rounded-md hover:bg-slate-800 disabled:opacity-50 transition-colors",disabled:v||!g.trim()||g.length>280,children:[(0,a.jsx)(o.Z,{className:"w-3 h-3"}),"Save Draft"]})]})]})]}),d&&!t&&(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)(l.Z,{className:"w-6 h-6 animate-spin text-slate-400 mx-auto"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-2",children:"Loading drafts..."})]}),m&&(0,a.jsx)("div",{className:"text-center py-12",children:(0,a.jsx)("p",{className:"text-sm text-red-500",children:m})}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Drafts (",C.length,")"]})}),0===C.length?(0,a.jsx)("div",{className:"text-center py-8 bg-slate-50 rounded-lg border border-dashed border-slate-200",children:(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"No pending drafts. The heartbeat will generate drafts as you ship features and hit milestones."})}):(0,a.jsx)("div",{className:"space-y-3 mb-8",children:C.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))}),S.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 mt-8",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold text-slate-900",children:["Published (",S.length,")"]})}),(0,a.jsx)("div",{className:"space-y-3",children:S.map(e=>(0,a.jsx)(j,{draft:e,onPublish:w,onEdit:k,onDiscard:_},e.id))})]})]})]})})}},1259:function(e,t,s){"use strict";s.d(t,{default:function(){return f}});var a=s(7437),r=s(7648),n=s(9376),l=s(5466),i=s(2048),d=s(8896),c=s(8220),o=s(2718),x=s(5621),u=s(8728),m=s(2222),h=s(2023),b=s(1994),p=s(257);let g=[{href:"/",label:"Dashboard",icon:(0,a.jsx)(l.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)(d.Z,{className:"w-5 h-5"})},{href:"/hypotheses",label:"Hypotheses",icon:(0,a.jsx)(c.Z,{className:"w-5 h-5"})},{href:"/social",label:"Social",icon:(0,a.jsx)(o.Z,{className:"w-5 h-5"})},{href:"/sessions",label:"Sessions",icon:(0,a.jsx)(x.Z,{className:"w-5 h-5"})},{href:"/settings",label:"Settings",icon:(0,a.jsx)(u.Z,{className:"w-5 h-5"})}];function f(e){let{children:t}=e,s=(0,n.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:g.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,b.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)(h.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})]})}},6153:function(e,t,s){"use strict";s.d(t,{G:function(){return i},GK:function(){return _},Gs:function(){return o},Hs:function(){return a},PN:function(){return h},PW:function(){return w},Q_:function(){return b},R$:function(){return y},Vr:function(){return x},Wb:function(){return m},aR:function(){return u},bi:function(){return d},en:function(){return v},i2:function(){return j},kT:function(){return p},l5:function(){return g},lE:function(){return N},lv:function(){return l},pG:function(){return r},rF:function(){return c},tV:function(){return f},tl:function(){return k},xP:function(){return Z},yb:function(){return n}});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"},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"},m={pending:"Pending",validated:"Validated",needs_investigation:"Needs Investigation",inconclusive:"Inconclusive",invalidated:"Invalidated"},h={ship:"Ship",update:"Update",milestone:"Milestone",digest:"Digest",manual:"Manual",thread:"Thread",insight:"Insight"},b={ship:"bg-green-100 text-green-800",update:"bg-blue-100 text-blue-800",milestone:"bg-amber-100 text-amber-800",digest:"bg-purple-100 text-purple-800",manual:"bg-slate-100 text-slate-800",thread:"bg-indigo-100 text-indigo-800",insight:"bg-cyan-100 text-cyan-800"},p={acquisition:"Acquisition",activation:"Activation",retention:"Retention",revenue:"Revenue",referral:"Referral"},g={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"},f={on_track:"On Track",at_risk:"At Risk",behind:"Behind",achieved:"Achieved"},j={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"},v={manual:"Manual",rest_api:"REST API",posthog:"PostHog",firestore:"Firestore",stripe:"Stripe",whatsapp:"WhatsApp"},y={stated:"Stated",testing:"Testing",validated:"Validated",invalidated:"Invalidated",deferred:"Deferred"},N={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"},w={acquisition:"Acquisition",engagement:"Engagement",conversion:"Conversion",monetization:"Monetization"},k={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"},_={planned:"Planned",active:"Active",completed:"Completed",paused:"Paused"},Z={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,[746,971,117,744],function(){return e(e.s=337)}),_N_E=e.O()}]);
|
package/README.md
CHANGED
package/dist/bin/vibebusiness.js
CHANGED
|
@@ -926,6 +926,22 @@ async function cmdHeartbeat(args) {
|
|
|
926
926
|
}
|
|
927
927
|
runScript("heartbeat.ts", args);
|
|
928
928
|
}
|
|
929
|
+
function cmdRun(args) {
|
|
930
|
+
printBanner();
|
|
931
|
+
const taskId = args[0];
|
|
932
|
+
if (!taskId) {
|
|
933
|
+
console.error(' Usage: vibebusiness run <task-id> [--desc="..."] [--dry-run]\n');
|
|
934
|
+
console.error(" Examples:");
|
|
935
|
+
console.error(" vibebusiness run social-draft-viral-insight");
|
|
936
|
+
console.error(" vibebusiness run social-check-status --dry-run");
|
|
937
|
+
console.error(' vibebusiness run posthog-kpi-check --desc="Check signup funnel"');
|
|
938
|
+
process.exit(1);
|
|
939
|
+
}
|
|
940
|
+
const passthrough = args.slice(1);
|
|
941
|
+
console.log(` Running task: ${taskId}
|
|
942
|
+
`);
|
|
943
|
+
runScript("heartbeat.ts", ["--task=" + taskId, "--skip-reasoning", ...passthrough]);
|
|
944
|
+
}
|
|
929
945
|
function cmdAnalyze(args) {
|
|
930
946
|
printBanner();
|
|
931
947
|
const typeArg = args.find((a) => a.startsWith("--type="));
|
|
@@ -1103,6 +1119,7 @@ function cmdHelp() {
|
|
|
1103
1119
|
start [--port=N] [--data=DIR] Start local dashboard (default: port 3001)
|
|
1104
1120
|
vibe [--dry-run] Run autonomous vibe loop (alias: heartbeat)
|
|
1105
1121
|
vibe --session Run continuous vibe session
|
|
1122
|
+
run <task-id> Run a specific skill task directly
|
|
1106
1123
|
analyze --type=<type> Run codebase analysis (quick|deep|metrics|seo|research)
|
|
1107
1124
|
implement --idea=<id> Implement an approved idea
|
|
1108
1125
|
activate <key> Activate a license key (e.g. PRO-xxxxx)
|
|
@@ -1129,6 +1146,7 @@ function cmdHelp() {
|
|
|
1129
1146
|
vibebusiness scan --dry-run # Preview what scan would extract
|
|
1130
1147
|
vibebusiness vibe --dry-run # Preview what the vibe loop would do
|
|
1131
1148
|
vibebusiness analyze --type=quick # Quick codebase scan
|
|
1149
|
+
vibebusiness run social-check-status # Run a specific skill task
|
|
1132
1150
|
vibebusiness vibe --session --duration=60 # Run for 60 minutes
|
|
1133
1151
|
|
|
1134
1152
|
AI Provider:
|
|
@@ -1159,6 +1177,10 @@ async function main() {
|
|
|
1159
1177
|
trackEvent("command_run", { command: "vibe", dryRun: commandArgs.includes("--dry-run"), session: commandArgs.includes("--session") });
|
|
1160
1178
|
cmdHeartbeat(commandArgs);
|
|
1161
1179
|
break;
|
|
1180
|
+
case "run":
|
|
1181
|
+
trackEvent("command_run", { command: "run", task: commandArgs[0] || "" });
|
|
1182
|
+
cmdRun(commandArgs);
|
|
1183
|
+
break;
|
|
1162
1184
|
case "analyze":
|
|
1163
1185
|
trackEvent("command_run", { command: "analyze", type: commandArgs.find((a) => a.startsWith("--type="))?.split("=")[1] || "quick" });
|
|
1164
1186
|
cmdAnalyze(commandArgs);
|
package/dist/scripts/analyze.js
CHANGED
|
@@ -555,7 +555,7 @@ Each idea must be a valid JSON object with these fields:
|
|
|
555
555
|
`;
|
|
556
556
|
function buildBaseContext(businessConfig) {
|
|
557
557
|
if (!businessConfig) {
|
|
558
|
-
return `You are an AI
|
|
558
|
+
return `You are an AI Product Manager.
|
|
559
559
|
|
|
560
560
|
Your role is to analyze the codebase and generate actionable improvement ideas.`;
|
|
561
561
|
}
|
|
@@ -572,7 +572,7 @@ Your role is to analyze the codebase and generate actionable improvement ideas.`
|
|
|
572
572
|
The product consists of:
|
|
573
573
|
${components}`;
|
|
574
574
|
}
|
|
575
|
-
return `You are an AI
|
|
575
|
+
return `You are an AI Product Manager for ${product.name}, ${product.summary}.${architectureSection}
|
|
576
576
|
|
|
577
577
|
Your role is to analyze the codebase and generate actionable improvement ideas.`;
|
|
578
578
|
}
|
|
@@ -1066,6 +1066,7 @@ var COMPETITORS_FILE = path.join(DATA_DIR, "competitors.json");
|
|
|
1066
1066
|
var POSITIONING_FILE = path.join(DATA_DIR, "positioning.json");
|
|
1067
1067
|
var PAGES_FILE = path.join(DATA_DIR, "pages.json");
|
|
1068
1068
|
var PAYMENTS_FILE = path.join(DATA_DIR, "payments.json");
|
|
1069
|
+
var POSTHOG_FILE = path.join(DATA_DIR, "posthog.json");
|
|
1069
1070
|
var SOCIAL_FILE = path.join(DATA_DIR, "social.json");
|
|
1070
1071
|
var TEMPLATES_DIR = path.join(__dirname, "..", "..", "templates");
|
|
1071
1072
|
var COMMAND_TEMPLATES_DIR = path.join(TEMPLATES_DIR, "commands");
|
|
@@ -1523,7 +1524,7 @@ Return ONLY this JSON structure (no markdown code blocks):
|
|
|
1523
1524
|
async function main() {
|
|
1524
1525
|
const { type, topic, context } = parseArgs();
|
|
1525
1526
|
console.log(`
|
|
1526
|
-
=== AI
|
|
1527
|
+
=== AI Product Manager - ${type.toUpperCase()} Analysis ===
|
|
1527
1528
|
`);
|
|
1528
1529
|
if (type === "research" && topic) {
|
|
1529
1530
|
console.log(`Research topic: ${topic}`);
|
package/dist/scripts/chat.js
CHANGED
|
@@ -76,6 +76,7 @@ var COMPETITORS_FILE = path.join(DATA_DIR, "competitors.json");
|
|
|
76
76
|
var POSITIONING_FILE = path.join(DATA_DIR, "positioning.json");
|
|
77
77
|
var PAGES_FILE = path.join(DATA_DIR, "pages.json");
|
|
78
78
|
var PAYMENTS_FILE = path.join(DATA_DIR, "payments.json");
|
|
79
|
+
var POSTHOG_FILE = path.join(DATA_DIR, "posthog.json");
|
|
79
80
|
var SOCIAL_FILE = path.join(DATA_DIR, "social.json");
|
|
80
81
|
var TEMPLATES_DIR = path.join(__dirname, "..", "..", "templates");
|
|
81
82
|
var COMMAND_TEMPLATES_DIR = path.join(TEMPLATES_DIR, "commands");
|
|
@@ -177,7 +178,7 @@ var SKILL_REGISTRY = [
|
|
|
177
178
|
when_to_use: "Need a new landing page, redesigning an existing one",
|
|
178
179
|
category: "content"
|
|
179
180
|
},
|
|
180
|
-
// Payments
|
|
181
|
+
// Payments & Integrations
|
|
181
182
|
{
|
|
182
183
|
command: "/setup-payments",
|
|
183
184
|
name: "Payment Setup",
|
|
@@ -185,6 +186,13 @@ var SKILL_REGISTRY = [
|
|
|
185
186
|
when_to_use: "Ready to accept payments, setting up Stripe, adding pricing tiers",
|
|
186
187
|
category: "payments"
|
|
187
188
|
},
|
|
189
|
+
{
|
|
190
|
+
command: "/setup-posthog",
|
|
191
|
+
name: "PostHog Analytics",
|
|
192
|
+
description: "Instrument PostHog product analytics \u2014 provider, pageviews, custom events",
|
|
193
|
+
when_to_use: "Setting up product analytics, tracking user behavior, measuring feature adoption",
|
|
194
|
+
category: "analytics"
|
|
195
|
+
},
|
|
188
196
|
// Data Management
|
|
189
197
|
{
|
|
190
198
|
command: "/manage",
|
|
@@ -279,7 +287,7 @@ function buildSystemPrompt(minimal) {
|
|
|
279
287
|
const sections = [];
|
|
280
288
|
sections.push(`## VibeBusiness Context
|
|
281
289
|
|
|
282
|
-
You are working inside the VibeBusiness project \u2014 an autonomous AI
|
|
290
|
+
You are working inside the VibeBusiness project \u2014 an autonomous AI product manager CLI.
|
|
283
291
|
Project root: ${PROJECT_DIR}
|
|
284
292
|
Data directory: ${DATA_DIR}
|
|
285
293
|
|
|
@@ -124,6 +124,7 @@ var COMPETITORS_FILE = path.join(DATA_DIR, "competitors.json");
|
|
|
124
124
|
var POSITIONING_FILE = path.join(DATA_DIR, "positioning.json");
|
|
125
125
|
var PAGES_FILE = path.join(DATA_DIR, "pages.json");
|
|
126
126
|
var PAYMENTS_FILE = path.join(DATA_DIR, "payments.json");
|
|
127
|
+
var POSTHOG_FILE = path.join(DATA_DIR, "posthog.json");
|
|
127
128
|
var SOCIAL_FILE = path.join(DATA_DIR, "social.json");
|
|
128
129
|
var TEMPLATES_DIR = path.join(__dirname, "..", "..", "templates");
|
|
129
130
|
var COMMAND_TEMPLATES_DIR = path.join(TEMPLATES_DIR, "commands");
|