vibebusiness 1.2.97 → 1.2.99
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 +1 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +40 -40
- 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_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 +1 -1
- package/.next/standalone/.next/server/app/briefing/page_client-reference-manifest.js +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_client-reference-manifest.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_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +1 -1
- package/.next/standalone/.next/server/app/kanban/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.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/investors/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/public/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.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 +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 +1 -1
- package/.next/standalone/.next/server/app/updates/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/updates/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/updates/new.html +1 -1
- package/.next/standalone/.next/server/app/updates/new.rsc +1 -1
- package/.next/standalone/.next/server/app/updates/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +15 -15
- 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/package.json +1 -1
- package/README.md +9 -1
- package/dist/bin/vibebusiness.js +37 -7
- package/dist/scripts/build.js +75 -34
- package/dist/scripts/init.js +35 -1
- package/package.json +1 -1
- /package/.next/static/{cyxfHYjbRBB40SijpCs7i → V849Md7GaY51HIOKjnH8f}/_buildManifest.js +0 -0
- /package/.next/static/{cyxfHYjbRBB40SijpCs7i → V849Md7GaY51HIOKjnH8f}/_ssgManifest.js +0 -0
package/dist/scripts/build.js
CHANGED
|
@@ -42,11 +42,12 @@ function log(msg) {
|
|
|
42
42
|
const ts = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
43
43
|
console.log(`[${ts}] ${msg}`);
|
|
44
44
|
}
|
|
45
|
+
var SHELL = process.env.SHELL || "/bin/sh";
|
|
45
46
|
function exec(cmd, cwd) {
|
|
46
|
-
return (0, import_child_process.execSync)(cmd, { cwd, stdio: "pipe", encoding: "utf-8" }).trim();
|
|
47
|
+
return (0, import_child_process.execSync)(cmd, { cwd, stdio: "pipe", encoding: "utf-8", shell: SHELL }).trim();
|
|
47
48
|
}
|
|
48
49
|
function execInherit(cmd, cwd) {
|
|
49
|
-
(0, import_child_process.execSync)(cmd, { cwd, stdio: "inherit" });
|
|
50
|
+
(0, import_child_process.execSync)(cmd, { cwd, stdio: "inherit", shell: SHELL });
|
|
50
51
|
}
|
|
51
52
|
function scaffold(dir) {
|
|
52
53
|
if (fs.existsSync(path.join(dir, "package.json"))) {
|
|
@@ -60,43 +61,76 @@ function scaffold(dir) {
|
|
|
60
61
|
fs.mkdirSync(parent, { recursive: true });
|
|
61
62
|
}
|
|
62
63
|
execInherit(
|
|
63
|
-
`npx create-next-app@latest ${name} --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --no-git`,
|
|
64
|
+
`npx create-next-app@latest ${name} --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --no-git --no-react-compiler --no-turbopack`,
|
|
64
65
|
parent
|
|
65
66
|
);
|
|
66
67
|
execInherit("git init", dir);
|
|
67
68
|
execInherit("git add -A", dir);
|
|
68
|
-
execInherit('git commit -m "Initial scaffold from create-next-app"', dir);
|
|
69
|
+
execInherit('git -c commit.gpgsign=false commit -m "Initial scaffold from create-next-app"', dir);
|
|
69
70
|
log("Scaffold complete \u2014 initial commit created.");
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
+
function buildVisionPrompt(rawIdea) {
|
|
73
|
+
return `You are a world-class product designer. Someone gave you this one-line idea:
|
|
74
|
+
|
|
75
|
+
"${rawIdea}"
|
|
76
|
+
|
|
77
|
+
Your job: envision the BEST possible version of this as a web experience.
|
|
78
|
+
|
|
79
|
+
Think about:
|
|
80
|
+
1. What is the core user flow? (What does the user do, step by step?)
|
|
81
|
+
2. What would make this genuinely impressive \u2014 not just functional, but "wow"?
|
|
82
|
+
3. If AI is involved, how should AI actually be used? (Don't just build a form that renders user input \u2014 make AI do the heavy lifting: generate content, make decisions, produce outputs the user couldn't easily create themselves)
|
|
83
|
+
4. What's the minimal input the user should provide vs what should be auto-generated or intelligently defaulted?
|
|
84
|
+
5. What would make someone screenshot this and share it?
|
|
85
|
+
|
|
86
|
+
Output a detailed product specification:
|
|
87
|
+
- Title and one-line description of what this does
|
|
88
|
+
- Core user flow (step by step, from landing to final output)
|
|
89
|
+
- Key pages/screens and what each contains
|
|
90
|
+
- Where AI adds value (what does AI generate, suggest, or automate?)
|
|
91
|
+
- Visual style direction
|
|
92
|
+
- The "wow moment" \u2014 the single thing that makes this special
|
|
93
|
+
|
|
94
|
+
Keep it to ~500 words. Be specific and opinionated \u2014 make strong choices, don't hedge.`;
|
|
95
|
+
}
|
|
96
|
+
async function envision(rawIdea, cwd) {
|
|
97
|
+
log("Envisioning the product...");
|
|
98
|
+
const prompt = buildVisionPrompt(rawIdea);
|
|
99
|
+
const vision = await runClaude(cwd, prompt, 12e4);
|
|
100
|
+
log("Product vision complete.");
|
|
101
|
+
return vision.trim();
|
|
102
|
+
}
|
|
103
|
+
function buildDecompositionPrompt(rawIdea, visionSpec) {
|
|
72
104
|
return `You are decomposing a brand-new web application into small, implementable sub-tasks for an AI coding agent.
|
|
73
105
|
|
|
74
|
-
##
|
|
75
|
-
${
|
|
106
|
+
## Product Vision
|
|
107
|
+
${visionSpec}
|
|
108
|
+
|
|
109
|
+
## Original Idea
|
|
110
|
+
${rawIdea}
|
|
76
111
|
|
|
77
112
|
## Existing Project Structure
|
|
78
|
-
This is a fresh create-next-app project with TypeScript and Tailwind CSS. Key files:
|
|
113
|
+
This is a fresh create-next-app project with TypeScript and Tailwind CSS (v4). Key files:
|
|
79
114
|
- src/app/page.tsx (home page)
|
|
80
115
|
- src/app/layout.tsx (root layout)
|
|
81
116
|
- src/app/globals.css (global styles with Tailwind)
|
|
82
|
-
- tailwind.config.ts
|
|
83
117
|
- package.json
|
|
84
118
|
- tsconfig.json
|
|
85
119
|
|
|
86
120
|
## Rules
|
|
87
121
|
|
|
88
|
-
1. Each sub-task should create or modify
|
|
89
|
-
2. Order by dependency:
|
|
90
|
-
3.
|
|
91
|
-
4. Each sub-task
|
|
92
|
-
5. The FIRST sub-task should create shared types,
|
|
93
|
-
6.
|
|
94
|
-
7.
|
|
95
|
-
8.
|
|
96
|
-
9.
|
|
97
|
-
10.
|
|
98
|
-
11.
|
|
99
|
-
12.
|
|
122
|
+
1. Each sub-task should create or modify 1-3 files maximum
|
|
123
|
+
2. Order by dependency: types/utils first, then components, then pages, then wiring/polish
|
|
124
|
+
3. Aim for 7-10 sub-tasks. Each should be completable in under 5 minutes by an AI agent
|
|
125
|
+
4. Each sub-task description should be 3-8 sentences \u2014 describe WHAT to build and the visual style, but do NOT spell out every CSS class. The AI agent is skilled at Tailwind and will choose appropriate classes
|
|
126
|
+
5. The FIRST sub-task should create shared TypeScript types, constants, and utility functions
|
|
127
|
+
6. The SECOND sub-task should set up global styles (dark theme CSS variables, custom animations) and update layout.tsx metadata
|
|
128
|
+
7. Focus on visual impressiveness: dark gradients, smooth animations, professional typography
|
|
129
|
+
8. Do NOT include test-writing sub-tasks
|
|
130
|
+
9. Every component should be production-quality \u2014 not placeholder or skeleton code
|
|
131
|
+
10. Use only built-in Next.js features and Tailwind \u2014 do NOT add npm dependencies
|
|
132
|
+
11. If you need icons, use inline SVG or emoji \u2014 do NOT add icon libraries
|
|
133
|
+
12. IMPORTANT: Keep descriptions concise. Do NOT list every CSS class or HTML attribute. Describe the component's purpose, layout structure, and visual style at a high level. Trust the AI agent to implement the details.
|
|
100
134
|
|
|
101
135
|
Respond with JSON only (no markdown code blocks, just raw JSON):
|
|
102
136
|
{
|
|
@@ -104,15 +138,15 @@ Respond with JSON only (no markdown code blocks, just raw JSON):
|
|
|
104
138
|
{
|
|
105
139
|
"id": "st-001",
|
|
106
140
|
"title": "Short descriptive title",
|
|
107
|
-
"description": "
|
|
141
|
+
"description": "Concise instructions: what files to create, component purpose, layout structure, visual style. 3-8 sentences max.",
|
|
108
142
|
"files_to_modify": ["src/path/to/file.tsx"]
|
|
109
143
|
}
|
|
110
144
|
]
|
|
111
145
|
}`;
|
|
112
146
|
}
|
|
113
|
-
async function decompose(
|
|
147
|
+
async function decompose(rawIdea, visionSpec, cwd) {
|
|
114
148
|
log("Decomposing idea into sub-tasks...");
|
|
115
|
-
const prompt = buildDecompositionPrompt(
|
|
149
|
+
const prompt = buildDecompositionPrompt(rawIdea, visionSpec);
|
|
116
150
|
const output = await runClaude(cwd, prompt, 6e5);
|
|
117
151
|
let jsonStr = output.trim();
|
|
118
152
|
const fenceMatch = jsonStr.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
@@ -137,11 +171,11 @@ async function decompose(ideaDescription, cwd) {
|
|
|
137
171
|
return [];
|
|
138
172
|
}
|
|
139
173
|
}
|
|
140
|
-
function buildSubTaskPrompt(task,
|
|
174
|
+
function buildSubTaskPrompt(task, visionSpec, taskIndex, totalTasks) {
|
|
141
175
|
return `You are building a web application from scratch. This is sub-task ${taskIndex + 1} of ${totalTasks}.
|
|
142
176
|
|
|
143
|
-
##
|
|
144
|
-
${
|
|
177
|
+
## Product Vision
|
|
178
|
+
${visionSpec}
|
|
145
179
|
|
|
146
180
|
## Your Current Sub-Task: ${task.title}
|
|
147
181
|
|
|
@@ -158,7 +192,7 @@ ${task.files_to_modify.map((f) => `- ${f}`).join("\n")}
|
|
|
158
192
|
- Do NOT install new npm packages unless explicitly told to
|
|
159
193
|
- Make sure the code compiles without TypeScript errors`;
|
|
160
194
|
}
|
|
161
|
-
function runClaude(cwd, prompt, timeoutMs =
|
|
195
|
+
function runClaude(cwd, prompt, timeoutMs = 6e5) {
|
|
162
196
|
const claudeArgs = [
|
|
163
197
|
"--print",
|
|
164
198
|
"--dangerously-skip-permissions",
|
|
@@ -229,17 +263,17 @@ function runClaude(cwd, prompt, timeoutMs = 3e5) {
|
|
|
229
263
|
});
|
|
230
264
|
});
|
|
231
265
|
}
|
|
232
|
-
async function executeSubTask(task,
|
|
266
|
+
async function executeSubTask(task, visionSpec, index, total, cwd) {
|
|
233
267
|
log(`
|
|
234
268
|
--- Sub-task ${index + 1}/${total}: ${task.title} ---`);
|
|
235
|
-
const prompt = buildSubTaskPrompt(task,
|
|
269
|
+
const prompt = buildSubTaskPrompt(task, visionSpec, index, total);
|
|
236
270
|
try {
|
|
237
271
|
await runClaude(cwd, prompt);
|
|
238
272
|
try {
|
|
239
273
|
exec("git add -A", cwd);
|
|
240
274
|
const status = exec("git status --porcelain", cwd);
|
|
241
275
|
if (status) {
|
|
242
|
-
exec(`git commit -m "feat: ${task.title}"`, cwd);
|
|
276
|
+
exec(`git -c commit.gpgsign=false commit -m "feat: ${task.title}"`, cwd);
|
|
243
277
|
log(`Committed: ${task.title}`);
|
|
244
278
|
} else {
|
|
245
279
|
log("No changes to commit.");
|
|
@@ -266,7 +300,6 @@ function countFiles(dir) {
|
|
|
266
300
|
let files = 0;
|
|
267
301
|
let lines = 0;
|
|
268
302
|
try {
|
|
269
|
-
const output = exec('git diff --stat HEAD~1000 HEAD 2>/dev/null || git diff --stat --cached 2>/dev/null || echo ""', dir);
|
|
270
303
|
const fileList = exec("git ls-files", dir);
|
|
271
304
|
files = fileList.split("\n").filter(Boolean).length;
|
|
272
305
|
const wc = exec("git ls-files | xargs wc -l 2>/dev/null | tail -1", dir);
|
|
@@ -288,7 +321,15 @@ async function main() {
|
|
|
288
321
|
log(`Target: ${targetDir}`);
|
|
289
322
|
log(`Model: ${model}`);
|
|
290
323
|
scaffold(targetDir);
|
|
291
|
-
const
|
|
324
|
+
const vision = await envision(idea, targetDir);
|
|
325
|
+
console.log(`
|
|
326
|
+
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
|
|
327
|
+
\u2502 Product Vision \u2502
|
|
328
|
+
\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
329
|
+
`);
|
|
330
|
+
console.log(vision);
|
|
331
|
+
console.log();
|
|
332
|
+
const subTasks = await decompose(idea, vision, targetDir);
|
|
292
333
|
if (subTasks.length === 0) {
|
|
293
334
|
log("No sub-tasks generated. Aborting.");
|
|
294
335
|
process.exit(1);
|
|
@@ -296,7 +337,7 @@ async function main() {
|
|
|
296
337
|
let completed = 0;
|
|
297
338
|
let failed = 0;
|
|
298
339
|
for (let i = 0; i < subTasks.length; i++) {
|
|
299
|
-
const ok = await executeSubTask(subTasks[i],
|
|
340
|
+
const ok = await executeSubTask(subTasks[i], vision, i, subTasks.length, targetDir);
|
|
300
341
|
if (ok) completed++;
|
|
301
342
|
else failed++;
|
|
302
343
|
}
|
package/dist/scripts/init.js
CHANGED
|
@@ -812,12 +812,39 @@ function buildReposFromDetected(detected) {
|
|
|
812
812
|
test_commands: []
|
|
813
813
|
}));
|
|
814
814
|
}
|
|
815
|
+
var EXAMPLE_IDEAS = [
|
|
816
|
+
"AI-powered startup pitch generator",
|
|
817
|
+
"Personal finance tracker with spending insights",
|
|
818
|
+
"Recipe generator from ingredients in your fridge",
|
|
819
|
+
"Job interview prep tool with AI coaching",
|
|
820
|
+
"Real estate deal analyzer for investors"
|
|
821
|
+
];
|
|
815
822
|
async function stepProjectMode() {
|
|
816
823
|
const choice = await askChoice("What would you like to do?", [
|
|
824
|
+
"Build a new app from an idea",
|
|
817
825
|
"Create a new project (Next.js + FastAPI)",
|
|
818
826
|
"Add an existing project"
|
|
819
827
|
]);
|
|
820
|
-
if (choice ===
|
|
828
|
+
if (choice === 0) {
|
|
829
|
+
print("\n I'll design and build a full web app from your one-sentence idea.");
|
|
830
|
+
const ideaChoice = await askChoice(
|
|
831
|
+
"Pick an example or describe your own:",
|
|
832
|
+
[...EXAMPLE_IDEAS, "Describe my own idea"]
|
|
833
|
+
);
|
|
834
|
+
let idea;
|
|
835
|
+
if (ideaChoice < EXAMPLE_IDEAS.length) {
|
|
836
|
+
idea = EXAMPLE_IDEAS[ideaChoice];
|
|
837
|
+
} else {
|
|
838
|
+
idea = await ask("Describe your app idea in one sentence");
|
|
839
|
+
}
|
|
840
|
+
if (!idea.trim()) {
|
|
841
|
+
print(" No idea provided. Aborted.");
|
|
842
|
+
process.exit(0);
|
|
843
|
+
}
|
|
844
|
+
const slug = idea.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 50);
|
|
845
|
+
return { type: "build", idea, slug };
|
|
846
|
+
}
|
|
847
|
+
if (choice === 2) {
|
|
821
848
|
const rootDir = await ask("Project root directory", process.cwd());
|
|
822
849
|
const resolvedDir = path8.resolve(rootDir);
|
|
823
850
|
if (!fs7.existsSync(resolvedDir)) {
|
|
@@ -1344,6 +1371,13 @@ async function main() {
|
|
|
1344
1371
|
}
|
|
1345
1372
|
try {
|
|
1346
1373
|
const mode = await stepProjectMode();
|
|
1374
|
+
if (mode.type === "build") {
|
|
1375
|
+
rl.close();
|
|
1376
|
+
const { command, args: scriptArgs } = resolveScript(__dirname, "build.ts");
|
|
1377
|
+
const child = (0, import_child_process2.spawn)(command, [...scriptArgs, `--idea=${mode.idea}`, `--target=./${mode.slug}`], { stdio: "inherit" });
|
|
1378
|
+
child.on("close", (code) => process.exit(code ?? 0));
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1347
1381
|
if (mode.type === "scaffold") {
|
|
1348
1382
|
const { scaffold } = mode;
|
|
1349
1383
|
const description = await ask(
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|