ultra-dex 1.0.1 → 1.2.0
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/README.md +3 -3
- package/bin/ultra-dex.js +219 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -99,9 +99,9 @@ Next steps:
|
|
|
99
99
|
|
|
100
100
|
## Links
|
|
101
101
|
|
|
102
|
-
- [Full Template](https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
103
|
-
- [Examples](https://github.com/Srujan0798/Ultra-Dex/tree/main
|
|
104
|
-
- [Methodology](https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
102
|
+
- [Full Template](https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/04-Imp-Template.md)
|
|
103
|
+
- [Examples](https://github.com/Srujan0798/Ultra-Dex/tree/main/@%20Ultra%20DeX/Saas%20plan/Examples)
|
|
104
|
+
- [Methodology](https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/03-METHODOLOGY.md)
|
|
105
105
|
|
|
106
106
|
## License
|
|
107
107
|
|
package/bin/ultra-dex.js
CHANGED
|
@@ -50,9 +50,9 @@ const QUICK_START_TEMPLATE = `# {{PROJECT_NAME}} - Quick Start
|
|
|
50
50
|
- {{PROBLEM_2}}
|
|
51
51
|
- {{PROBLEM_3}}
|
|
52
52
|
|
|
53
|
-
## 3.
|
|
53
|
+
## 3. Core Production Features (5 max)
|
|
54
54
|
|
|
55
|
-
| Feature | Priority |
|
|
55
|
+
| Feature | Priority | Justification |
|
|
56
56
|
|---------|----------|---------------|
|
|
57
57
|
| {{FEATURE_1}} | P0 | |
|
|
58
58
|
| | P0 | |
|
|
@@ -103,7 +103,7 @@ Setting up the implementation plan.
|
|
|
103
103
|
|
|
104
104
|
## Resources
|
|
105
105
|
- [Ultra-Dex Template](https://github.com/Srujan0798/Ultra-Dex)
|
|
106
|
-
- [TaskFlow Example](https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
106
|
+
- [TaskFlow Example](https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/Examples/TaskFlow-Complete.md)
|
|
107
107
|
`;
|
|
108
108
|
|
|
109
109
|
program
|
|
@@ -162,7 +162,7 @@ program
|
|
|
162
162
|
{
|
|
163
163
|
type: 'input',
|
|
164
164
|
name: 'feature1',
|
|
165
|
-
message: '
|
|
165
|
+
message: 'Critical production feature:',
|
|
166
166
|
default: '',
|
|
167
167
|
},
|
|
168
168
|
{
|
|
@@ -195,6 +195,24 @@ program
|
|
|
195
195
|
message: 'Hosting:',
|
|
196
196
|
choices: ['Vercel', 'Railway', 'Fly.io', 'AWS', 'Other'],
|
|
197
197
|
},
|
|
198
|
+
{
|
|
199
|
+
type: 'confirm',
|
|
200
|
+
name: 'includeCursorRules',
|
|
201
|
+
message: 'Include cursor-rules for AI assistants? (Cursor, Copilot)',
|
|
202
|
+
default: true,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: 'confirm',
|
|
206
|
+
name: 'includeFullTemplate',
|
|
207
|
+
message: 'Copy full 34-section template locally?',
|
|
208
|
+
default: false,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
type: 'confirm',
|
|
212
|
+
name: 'includeDocs',
|
|
213
|
+
message: 'Copy VERIFICATION.md & AGENT-INSTRUCTIONS.md to docs/?',
|
|
214
|
+
default: true,
|
|
215
|
+
},
|
|
198
216
|
]);
|
|
199
217
|
|
|
200
218
|
const spinner = ora('Creating project files...').start();
|
|
@@ -255,27 +273,82 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
255
273
|
|
|
256
274
|
## Resources
|
|
257
275
|
|
|
258
|
-
- [Full Template](https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
259
|
-
- [TaskFlow Example](https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
260
|
-
- [Methodology](https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
276
|
+
- [Full Template](https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/04-Imp-Template.md)
|
|
277
|
+
- [TaskFlow Example](https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/Examples/TaskFlow-Complete.md)
|
|
278
|
+
- [Methodology](https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/03-METHODOLOGY.md)
|
|
261
279
|
`;
|
|
262
280
|
|
|
263
281
|
await fs.writeFile(path.join(outputDir, 'IMPLEMENTATION-PLAN.md'), planContent);
|
|
264
282
|
|
|
283
|
+
// Copy cursor-rules if requested
|
|
284
|
+
if (answers.includeCursorRules) {
|
|
285
|
+
const rulesDir = path.join(outputDir, '.cursor', 'rules');
|
|
286
|
+
await fs.mkdir(rulesDir, { recursive: true });
|
|
287
|
+
|
|
288
|
+
const cursorRulesPath = path.resolve(__dirname, '../../cursor-rules');
|
|
289
|
+
try {
|
|
290
|
+
const ruleFiles = await fs.readdir(cursorRulesPath);
|
|
291
|
+
for (const file of ruleFiles.filter(f => f.endsWith('.mdc'))) {
|
|
292
|
+
await fs.copyFile(
|
|
293
|
+
path.join(cursorRulesPath, file),
|
|
294
|
+
path.join(rulesDir, file)
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
} catch (err) {
|
|
298
|
+
// Cursor rules not available (npm package, not local)
|
|
299
|
+
console.log(chalk.yellow('\n Note: cursor-rules not bundled. Download from GitHub:'));
|
|
300
|
+
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/tree/main/cursor-rules'));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Copy full template if requested
|
|
305
|
+
if (answers.includeFullTemplate) {
|
|
306
|
+
const templatePath = path.resolve(__dirname, '../../@ Ultra DeX/Saas plan/04-Imp-Template.md');
|
|
307
|
+
try {
|
|
308
|
+
await fs.copyFile(templatePath, path.join(outputDir, 'docs', 'MASTER-PLAN.md'));
|
|
309
|
+
} catch (err) {
|
|
310
|
+
console.log(chalk.yellow('\n Note: Full template not bundled. Download from GitHub:'));
|
|
311
|
+
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/04-Imp-Template.md'));
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Copy docs if requested
|
|
316
|
+
if (answers.includeDocs) {
|
|
317
|
+
const verificationPath = path.resolve(__dirname, '../../VERIFICATION.md');
|
|
318
|
+
const agentPath = path.resolve(__dirname, '../../AGENT-INSTRUCTIONS.md');
|
|
319
|
+
try {
|
|
320
|
+
await fs.copyFile(verificationPath, path.join(outputDir, 'docs', 'CHECKLIST.md'));
|
|
321
|
+
await fs.copyFile(agentPath, path.join(outputDir, 'docs', 'AI-PROMPTS.md'));
|
|
322
|
+
} catch (err) {
|
|
323
|
+
console.log(chalk.yellow('\n Note: Docs not bundled. Download from GitHub:'));
|
|
324
|
+
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex'));
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
265
328
|
spinner.succeed(chalk.green('Project created successfully!'));
|
|
266
329
|
|
|
267
330
|
console.log('\n' + chalk.bold('Files created:'));
|
|
268
331
|
console.log(chalk.gray(` ${outputDir}/`));
|
|
269
332
|
console.log(chalk.gray(' ├── QUICK-START.md'));
|
|
270
333
|
console.log(chalk.gray(' ├── CONTEXT.md'));
|
|
271
|
-
console.log(chalk.gray('
|
|
334
|
+
console.log(chalk.gray(' ├── IMPLEMENTATION-PLAN.md'));
|
|
335
|
+
if (answers.includeFullTemplate) {
|
|
336
|
+
console.log(chalk.gray(' ├── docs/MASTER-PLAN.md (34 sections)'));
|
|
337
|
+
}
|
|
338
|
+
if (answers.includeDocs) {
|
|
339
|
+
console.log(chalk.gray(' ├── docs/CHECKLIST.md'));
|
|
340
|
+
console.log(chalk.gray(' ├── docs/AI-PROMPTS.md'));
|
|
341
|
+
}
|
|
342
|
+
if (answers.includeCursorRules) {
|
|
343
|
+
console.log(chalk.gray(' └── .cursor/rules/ (11 AI rule files)'));
|
|
344
|
+
}
|
|
272
345
|
|
|
273
346
|
console.log('\n' + chalk.bold('Next steps:'));
|
|
274
347
|
console.log(chalk.cyan(` 1. cd ${answers.projectName}`));
|
|
275
348
|
console.log(chalk.cyan(' 2. Open QUICK-START.md and complete it'));
|
|
276
349
|
console.log(chalk.cyan(' 3. Start building! 🚀'));
|
|
277
350
|
|
|
278
|
-
console.log('\n' + chalk.gray('
|
|
351
|
+
console.log('\n' + chalk.gray('Full Ultra-Dex repo:'));
|
|
279
352
|
console.log(chalk.blue(' https://github.com/Srujan0798/Ultra-Dex'));
|
|
280
353
|
|
|
281
354
|
} catch (error) {
|
|
@@ -285,6 +358,140 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
285
358
|
}
|
|
286
359
|
});
|
|
287
360
|
|
|
361
|
+
program
|
|
362
|
+
.command('audit')
|
|
363
|
+
.description('Audit your Ultra-Dex project for completeness')
|
|
364
|
+
.option('-d, --dir <directory>', 'Project directory to audit', '.')
|
|
365
|
+
.action(async (options) => {
|
|
366
|
+
console.log(chalk.cyan('\n🔍 Ultra-Dex Project Audit\n'));
|
|
367
|
+
|
|
368
|
+
const projectDir = path.resolve(options.dir);
|
|
369
|
+
let score = 0;
|
|
370
|
+
let maxScore = 0;
|
|
371
|
+
const results = [];
|
|
372
|
+
|
|
373
|
+
// Helper function to check file exists and has content
|
|
374
|
+
async function checkFile(filePath, description, points) {
|
|
375
|
+
maxScore += points;
|
|
376
|
+
try {
|
|
377
|
+
const content = await fs.readFile(path.join(projectDir, filePath), 'utf-8');
|
|
378
|
+
if (content.length > 50) {
|
|
379
|
+
score += points;
|
|
380
|
+
results.push({ status: '✅', item: description, points: `+${points}` });
|
|
381
|
+
return content;
|
|
382
|
+
} else {
|
|
383
|
+
results.push({ status: '⚠️', item: `${description} (empty/too short)`, points: '0' });
|
|
384
|
+
return null;
|
|
385
|
+
}
|
|
386
|
+
} catch {
|
|
387
|
+
results.push({ status: '❌', item: `${description} (missing)`, points: '0' });
|
|
388
|
+
return null;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// Helper to check content has section
|
|
393
|
+
function hasSection(content, sectionName, points) {
|
|
394
|
+
maxScore += points;
|
|
395
|
+
if (content && content.toLowerCase().includes(sectionName.toLowerCase())) {
|
|
396
|
+
score += points;
|
|
397
|
+
results.push({ status: '✅', item: `Has ${sectionName}`, points: `+${points}` });
|
|
398
|
+
return true;
|
|
399
|
+
} else {
|
|
400
|
+
results.push({ status: '❌', item: `Missing ${sectionName}`, points: '0' });
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Check core files
|
|
406
|
+
console.log(chalk.bold('Checking project files...\n'));
|
|
407
|
+
|
|
408
|
+
const quickStart = await checkFile('QUICK-START.md', 'QUICK-START.md', 10);
|
|
409
|
+
const context = await checkFile('CONTEXT.md', 'CONTEXT.md', 5);
|
|
410
|
+
const implPlan = await checkFile('IMPLEMENTATION-PLAN.md', 'IMPLEMENTATION-PLAN.md', 5);
|
|
411
|
+
const fullTemplate = await checkFile('04-Imp-Template.md', '04-Imp-Template.md', 10);
|
|
412
|
+
|
|
413
|
+
// Check for alternative file names
|
|
414
|
+
const readme = await checkFile('README.md', 'README.md', 5);
|
|
415
|
+
|
|
416
|
+
// Check content quality if QUICK-START exists
|
|
417
|
+
if (quickStart) {
|
|
418
|
+
hasSection(quickStart, 'idea', 5);
|
|
419
|
+
hasSection(quickStart, 'problem', 5);
|
|
420
|
+
hasSection(quickStart, 'mvp', 5);
|
|
421
|
+
hasSection(quickStart, 'tech stack', 10);
|
|
422
|
+
hasSection(quickStart, 'feature', 5);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// Check for implementation details
|
|
426
|
+
if (implPlan) {
|
|
427
|
+
hasSection(implPlan, 'database', 5);
|
|
428
|
+
hasSection(implPlan, 'api', 5);
|
|
429
|
+
hasSection(implPlan, 'auth', 5);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// Check for docs folder
|
|
433
|
+
try {
|
|
434
|
+
await fs.access(path.join(projectDir, 'docs'));
|
|
435
|
+
score += 5;
|
|
436
|
+
maxScore += 5;
|
|
437
|
+
results.push({ status: '✅', item: 'docs/ folder exists', points: '+5' });
|
|
438
|
+
} catch {
|
|
439
|
+
maxScore += 5;
|
|
440
|
+
results.push({ status: '⚠️', item: 'docs/ folder (optional)', points: '0' });
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// Print results
|
|
444
|
+
console.log(chalk.bold('Audit Results:\n'));
|
|
445
|
+
results.forEach(r => {
|
|
446
|
+
const statusColor = r.status === '✅' ? chalk.green : r.status === '❌' ? chalk.red : chalk.yellow;
|
|
447
|
+
console.log(` ${statusColor(r.status)} ${r.item} ${chalk.gray(r.points)}`);
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
// Calculate percentage
|
|
451
|
+
const percentage = Math.round((score / maxScore) * 100);
|
|
452
|
+
|
|
453
|
+
console.log('\n' + chalk.bold('─'.repeat(50)));
|
|
454
|
+
console.log(chalk.bold(`\nScore: ${score}/${maxScore} (${percentage}%)\n`));
|
|
455
|
+
|
|
456
|
+
// Grade
|
|
457
|
+
let grade, gradeColor, message;
|
|
458
|
+
if (percentage >= 90) {
|
|
459
|
+
grade = 'A';
|
|
460
|
+
gradeColor = chalk.green;
|
|
461
|
+
message = 'Excellent! Your project is well-documented.';
|
|
462
|
+
} else if (percentage >= 75) {
|
|
463
|
+
grade = 'B';
|
|
464
|
+
gradeColor = chalk.green;
|
|
465
|
+
message = 'Good! A few more sections would help.';
|
|
466
|
+
} else if (percentage >= 60) {
|
|
467
|
+
grade = 'C';
|
|
468
|
+
gradeColor = chalk.yellow;
|
|
469
|
+
message = 'Fair. Consider filling more sections before coding.';
|
|
470
|
+
} else if (percentage >= 40) {
|
|
471
|
+
grade = 'D';
|
|
472
|
+
gradeColor = chalk.yellow;
|
|
473
|
+
message = 'Needs work. Use QUICK-START.md to define your project.';
|
|
474
|
+
} else {
|
|
475
|
+
grade = 'F';
|
|
476
|
+
gradeColor = chalk.red;
|
|
477
|
+
message = 'Run "npx ultra-dex init" to get started properly.';
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
console.log(gradeColor(`Grade: ${grade}`));
|
|
481
|
+
console.log(chalk.gray(message));
|
|
482
|
+
|
|
483
|
+
// Suggestions
|
|
484
|
+
const missing = results.filter(r => r.status === '❌');
|
|
485
|
+
if (missing.length > 0) {
|
|
486
|
+
console.log(chalk.bold('\n📋 To improve your score:\n'));
|
|
487
|
+
missing.slice(0, 5).forEach(m => {
|
|
488
|
+
console.log(chalk.cyan(` → Add ${m.item.replace(' (missing)', '')}`));
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
console.log('\n' + chalk.gray('Learn more: https://github.com/Srujan0798/Ultra-Dex\n'));
|
|
493
|
+
});
|
|
494
|
+
|
|
288
495
|
program
|
|
289
496
|
.command('examples')
|
|
290
497
|
.description('List available examples')
|
|
@@ -295,17 +502,17 @@ program
|
|
|
295
502
|
{
|
|
296
503
|
name: 'TaskFlow',
|
|
297
504
|
type: 'Task Management',
|
|
298
|
-
url: 'https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
505
|
+
url: 'https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/Examples/TaskFlow-Complete.md',
|
|
299
506
|
},
|
|
300
507
|
{
|
|
301
508
|
name: 'InvoiceFlow',
|
|
302
509
|
type: 'Invoicing',
|
|
303
|
-
url: 'https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
510
|
+
url: 'https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/Examples/InvoiceFlow-Complete.md',
|
|
304
511
|
},
|
|
305
512
|
{
|
|
306
513
|
name: 'HabitStack',
|
|
307
514
|
type: 'Habit Tracking',
|
|
308
|
-
url: 'https://github.com/Srujan0798/Ultra-Dex/blob/main
|
|
515
|
+
url: 'https://github.com/Srujan0798/Ultra-Dex/blob/main/@%20Ultra%20DeX/Saas%20plan/Examples/HabitStack-Complete.md',
|
|
309
516
|
},
|
|
310
517
|
];
|
|
311
518
|
|
package/package.json
CHANGED