ultra-dex 1.7.1 ā 1.7.3
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 +45 -3
- package/bin/ultra-dex.js +396 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,12 +13,12 @@ cd your-project
|
|
|
13
13
|
cat QUICK-START.md
|
|
14
14
|
|
|
15
15
|
# 3. Load Cursor rules for AI assistance (1 min)
|
|
16
|
-
|
|
17
|
-
# Then: ./load.sh database api auth
|
|
16
|
+
npx degit Srujan0798/Ultra-Dex/cursor-rules .cursor/rules
|
|
17
|
+
# Then: cd .cursor/rules && ./load.sh database api auth
|
|
18
18
|
|
|
19
19
|
# 4. Start building with AI agents (4 min)
|
|
20
20
|
# Use @Backend, @Frontend, @Database agents
|
|
21
|
-
|
|
21
|
+
npx ultra-dex agents
|
|
22
22
|
|
|
23
23
|
# You're ready to code!
|
|
24
24
|
```
|
|
@@ -92,6 +92,42 @@ npx ultra-dex agent backend
|
|
|
92
92
|
|
|
93
93
|
Prints the full agent prompt. Copy and paste into your AI tool (Cursor, Claude, ChatGPT).
|
|
94
94
|
|
|
95
|
+
### Set up git hooks
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npx ultra-dex hooks
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Installs a pre-commit hook that:
|
|
102
|
+
- Validates project structure before each commit
|
|
103
|
+
- Blocks commits if required files are missing
|
|
104
|
+
- Can be bypassed with `git commit --no-verify`
|
|
105
|
+
|
|
106
|
+
Remove with: `npx ultra-dex hooks --remove`
|
|
107
|
+
|
|
108
|
+
### Fetch assets for offline use
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx ultra-dex fetch
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Downloads all Ultra-Dex assets locally for offline development:
|
|
115
|
+
- Cursor rules (12 .mdc files)
|
|
116
|
+
- Agent prompts (16 agents)
|
|
117
|
+
- Documentation and guides
|
|
118
|
+
|
|
119
|
+
Options:
|
|
120
|
+
- `--dir <path>` - Target directory (default: `.ultra-dex`)
|
|
121
|
+
- `--agents` - Fetch only agent prompts
|
|
122
|
+
- `--rules` - Fetch only cursor rules
|
|
123
|
+
- `--docs` - Fetch only documentation
|
|
124
|
+
|
|
125
|
+
After fetching, copy to your project:
|
|
126
|
+
```bash
|
|
127
|
+
cp -r .ultra-dex/cursor-rules .cursor/rules
|
|
128
|
+
cp -r .ultra-dex/agents .agents
|
|
129
|
+
```
|
|
130
|
+
|
|
95
131
|
## Commands
|
|
96
132
|
|
|
97
133
|
| Command | Description |
|
|
@@ -101,6 +137,12 @@ Prints the full agent prompt. Copy and paste into your AI tool (Cursor, Claude,
|
|
|
101
137
|
| `ultra-dex examples` | List available examples |
|
|
102
138
|
| `ultra-dex agents` | List available AI agents |
|
|
103
139
|
| `ultra-dex agent <name>` | Show specific agent prompt |
|
|
140
|
+
| `ultra-dex pack <agent>` | Package context + agent for any AI |
|
|
141
|
+
| `ultra-dex hooks` | Set up git pre-commit hooks |
|
|
142
|
+
| `ultra-dex fetch` | Download assets for offline use |
|
|
143
|
+
| `ultra-dex validate` | Validate project structure |
|
|
144
|
+
| `ultra-dex workflow <feature>` | Show workflow for a feature |
|
|
145
|
+
| `ultra-dex suggest` | Get AI agent suggestions |
|
|
104
146
|
| `ultra-dex --help` | Show help |
|
|
105
147
|
| `ultra-dex --version` | Show version |
|
|
106
148
|
|
package/bin/ultra-dex.js
CHANGED
|
@@ -300,10 +300,21 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
300
300
|
path.join(rulesDir, file)
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
|
+
// Also generate .github/copilot-instructions.md for Copilot users
|
|
304
|
+
const coreRulePath = path.join(cursorRulesPath, '00-ultra-dex-core.mdc');
|
|
305
|
+
try {
|
|
306
|
+
const coreContent = await fs.readFile(coreRulePath, 'utf-8');
|
|
307
|
+
const dotGithub = path.join(outputDir, '.github');
|
|
308
|
+
await fs.mkdir(dotGithub, { recursive: true });
|
|
309
|
+
await fs.writeFile(path.join(dotGithub, 'copilot-instructions.md'), coreContent);
|
|
310
|
+
} catch (e) {
|
|
311
|
+
// Core rule not available - skip Copilot setup
|
|
312
|
+
}
|
|
303
313
|
} catch (err) {
|
|
304
|
-
// Cursor rules not
|
|
305
|
-
console.log(chalk.gray('\n Cursor rules
|
|
306
|
-
console.log(chalk.
|
|
314
|
+
// Cursor rules not bundled - intentional design choice for npm package size
|
|
315
|
+
console.log(chalk.gray('\n š¦ Cursor rules not bundled (keeps npm package <50KB)'));
|
|
316
|
+
console.log(chalk.cyan(' Quick setup: npx degit Srujan0798/Ultra-Dex/cursor-rules .cursor/rules'));
|
|
317
|
+
console.log(chalk.blue(' Or download: https://github.com/Srujan0798/Ultra-Dex/tree/main/cursor-rules'));
|
|
307
318
|
}
|
|
308
319
|
}
|
|
309
320
|
|
|
@@ -313,9 +324,10 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
313
324
|
try {
|
|
314
325
|
await fs.copyFile(templatePath, path.join(outputDir, 'docs', 'MASTER-PLAN.md'));
|
|
315
326
|
} catch (err) {
|
|
316
|
-
// Template not
|
|
317
|
-
console.log(chalk.gray('\n Full
|
|
318
|
-
console.log(chalk.
|
|
327
|
+
// Template not bundled - keeps npm package lightweight
|
|
328
|
+
console.log(chalk.gray('\n š¦ Full template not bundled (5,500 lines - too large for npm)'));
|
|
329
|
+
console.log(chalk.cyan(' Quick fetch: curl -O https://raw.githubusercontent.com/Srujan0798/Ultra-Dex/main/%40%20Ultra%20DeX/Saas%20plan/04-Imp-Template.md'));
|
|
330
|
+
console.log(chalk.blue(' Or view: https://github.com/Srujan0798/Ultra-Dex/blob/main/%40%20Ultra%20DeX/Saas%20plan/04-Imp-Template.md'));
|
|
319
331
|
}
|
|
320
332
|
}
|
|
321
333
|
|
|
@@ -327,9 +339,10 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
327
339
|
await fs.copyFile(verificationPath, path.join(outputDir, 'docs', 'CHECKLIST.md'));
|
|
328
340
|
await fs.copyFile(agentPath, path.join(outputDir, 'docs', 'AI-PROMPTS.md'));
|
|
329
341
|
} catch (err) {
|
|
330
|
-
// Docs not
|
|
331
|
-
console.log(chalk.gray('\n Verification
|
|
332
|
-
console.log(chalk.
|
|
342
|
+
// Docs not bundled - intentional for npm package size
|
|
343
|
+
console.log(chalk.gray('\n š¦ Verification & instructions not bundled (npm size optimization)'));
|
|
344
|
+
console.log(chalk.cyan(' Quick setup: npx degit Srujan0798/Ultra-Dex/docs docs'));
|
|
345
|
+
console.log(chalk.blue(' Or view: https://github.com/Srujan0798/Ultra-Dex/tree/main/docs'));
|
|
333
346
|
}
|
|
334
347
|
}
|
|
335
348
|
|
|
@@ -366,9 +379,10 @@ ${answers.ideaWhat} for ${answers.ideaFor}.
|
|
|
366
379
|
path.join(agentsDir, 'README.md')
|
|
367
380
|
);
|
|
368
381
|
} catch (err) {
|
|
369
|
-
// Agents not
|
|
370
|
-
console.log(chalk.gray('\n
|
|
371
|
-
console.log(chalk.
|
|
382
|
+
// Agents not bundled - intentional for npm package size
|
|
383
|
+
console.log(chalk.gray('\n š¦ Agent prompts not bundled (npm size optimization)'));
|
|
384
|
+
console.log(chalk.cyan(' Quick setup: npx degit Srujan0798/Ultra-Dex/agents .agents'));
|
|
385
|
+
console.log(chalk.blue(' Or view: https://github.com/Srujan0798/Ultra-Dex/tree/main/agents'));
|
|
372
386
|
}
|
|
373
387
|
}
|
|
374
388
|
|
|
@@ -651,6 +665,80 @@ program
|
|
|
651
665
|
}
|
|
652
666
|
});
|
|
653
667
|
|
|
668
|
+
// Pack command - assemble context for any AI tool
|
|
669
|
+
program
|
|
670
|
+
.command('pack <agent>')
|
|
671
|
+
.description('Package project context + agent prompt for any AI tool')
|
|
672
|
+
.option('-c, --clipboard', 'Copy to clipboard (requires pbcopy/xclip)')
|
|
673
|
+
.action(async (agentName, options) => {
|
|
674
|
+
// Find agent
|
|
675
|
+
const agent = AGENTS.find(a => a.name.toLowerCase() === agentName.toLowerCase());
|
|
676
|
+
if (!agent) {
|
|
677
|
+
console.log(chalk.red(`\nā Agent "${agentName}" not found.\n`));
|
|
678
|
+
console.log(chalk.gray('Available agents:'));
|
|
679
|
+
AGENTS.forEach(a => console.log(chalk.cyan(` - ${a.name}`)));
|
|
680
|
+
process.exit(1);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
let output = '';
|
|
684
|
+
|
|
685
|
+
// 1. Read Agent Prompt
|
|
686
|
+
const agentPath = path.resolve(__dirname, '../../agents', agent.file);
|
|
687
|
+
try {
|
|
688
|
+
const agentPrompt = await fs.readFile(agentPath, 'utf-8');
|
|
689
|
+
output += agentPrompt + '\n\n';
|
|
690
|
+
} catch (err) {
|
|
691
|
+
output += `# ${agent.name.toUpperCase()} Agent\n\nSee: https://github.com/Srujan0798/Ultra-Dex/blob/main/agents/${agent.file}\n\n`;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
output += '---\n\n';
|
|
695
|
+
|
|
696
|
+
// 2. Read CONTEXT.md
|
|
697
|
+
try {
|
|
698
|
+
const context = await fs.readFile('CONTEXT.md', 'utf-8');
|
|
699
|
+
output += '# PROJECT CONTEXT\n\n' + context + '\n\n';
|
|
700
|
+
} catch (err) {
|
|
701
|
+
output += '# PROJECT CONTEXT\n\n*No CONTEXT.md found. Run `ultra-dex init` first.*\n\n';
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
output += '---\n\n';
|
|
705
|
+
|
|
706
|
+
// 3. Read IMPLEMENTATION-PLAN.md
|
|
707
|
+
try {
|
|
708
|
+
const plan = await fs.readFile('IMPLEMENTATION-PLAN.md', 'utf-8');
|
|
709
|
+
output += '# IMPLEMENTATION PLAN\n\n' + plan + '\n';
|
|
710
|
+
} catch (err) {
|
|
711
|
+
output += '# IMPLEMENTATION PLAN\n\n*No IMPLEMENTATION-PLAN.md found. Run `ultra-dex init` first.*\n';
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// Output
|
|
715
|
+
console.log(chalk.bold(`\nš¦ Packed context for @${agent.name}\n`));
|
|
716
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
717
|
+
console.log(output);
|
|
718
|
+
console.log(chalk.gray('ā'.repeat(60)));
|
|
719
|
+
|
|
720
|
+
// Try to copy to clipboard if requested
|
|
721
|
+
if (options.clipboard) {
|
|
722
|
+
try {
|
|
723
|
+
const { execSync } = require('child_process');
|
|
724
|
+
const platform = process.platform;
|
|
725
|
+
if (platform === 'darwin') {
|
|
726
|
+
execSync('pbcopy', { input: output });
|
|
727
|
+
console.log(chalk.green('\nā
Copied to clipboard!\n'));
|
|
728
|
+
} else if (platform === 'linux') {
|
|
729
|
+
execSync('xclip -selection clipboard', { input: output });
|
|
730
|
+
console.log(chalk.green('\nā
Copied to clipboard!\n'));
|
|
731
|
+
} else {
|
|
732
|
+
console.log(chalk.yellow('\nā ļø Clipboard not supported on this platform. Copy manually.\n'));
|
|
733
|
+
}
|
|
734
|
+
} catch (err) {
|
|
735
|
+
console.log(chalk.yellow('\nā ļø Could not copy to clipboard. Copy manually.\n'));
|
|
736
|
+
}
|
|
737
|
+
} else {
|
|
738
|
+
console.log(chalk.cyan('\nš” Tip: Use --clipboard flag to copy directly\n'));
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
|
|
654
742
|
// Workflow examples map
|
|
655
743
|
const WORKFLOWS = {
|
|
656
744
|
auth: {
|
|
@@ -1090,4 +1178,300 @@ program
|
|
|
1090
1178
|
console.log('\n' + chalk.gray('Run "ultra-dex init" to set up a proper Ultra-Dex project.\n'));
|
|
1091
1179
|
});
|
|
1092
1180
|
|
|
1181
|
+
// ========================================
|
|
1182
|
+
// HOOKS COMMAND - Automated Verification
|
|
1183
|
+
// ========================================
|
|
1184
|
+
program
|
|
1185
|
+
.command('hooks')
|
|
1186
|
+
.description('Set up git hooks for automated verification')
|
|
1187
|
+
.option('--remove', 'Remove Ultra-Dex git hooks')
|
|
1188
|
+
.action(async (options) => {
|
|
1189
|
+
console.log(chalk.cyan('\nšŖ Ultra-Dex Git Hooks Setup\n'));
|
|
1190
|
+
|
|
1191
|
+
const gitDir = path.join(process.cwd(), '.git');
|
|
1192
|
+
const hooksDir = path.join(gitDir, 'hooks');
|
|
1193
|
+
|
|
1194
|
+
// Check if git repo exists
|
|
1195
|
+
try {
|
|
1196
|
+
await fs.access(gitDir);
|
|
1197
|
+
} catch {
|
|
1198
|
+
console.log(chalk.red('ā Not a git repository. Run "git init" first.\n'));
|
|
1199
|
+
process.exit(1);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// Create hooks directory if it doesn't exist
|
|
1203
|
+
await fs.mkdir(hooksDir, { recursive: true });
|
|
1204
|
+
|
|
1205
|
+
const preCommitPath = path.join(hooksDir, 'pre-commit');
|
|
1206
|
+
|
|
1207
|
+
if (options.remove) {
|
|
1208
|
+
// Remove hooks
|
|
1209
|
+
try {
|
|
1210
|
+
const content = await fs.readFile(preCommitPath, 'utf-8');
|
|
1211
|
+
if (content.includes('ultra-dex')) {
|
|
1212
|
+
await fs.unlink(preCommitPath);
|
|
1213
|
+
console.log(chalk.green('ā
Ultra-Dex pre-commit hook removed.\n'));
|
|
1214
|
+
} else {
|
|
1215
|
+
console.log(chalk.yellow('ā ļø Pre-commit hook exists but is not from Ultra-Dex.\n'));
|
|
1216
|
+
}
|
|
1217
|
+
} catch {
|
|
1218
|
+
console.log(chalk.gray('No Ultra-Dex hooks found.\n'));
|
|
1219
|
+
}
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
// Generate pre-commit hook
|
|
1224
|
+
const preCommitScript = `#!/bin/sh
|
|
1225
|
+
# Ultra-Dex Pre-Commit Hook
|
|
1226
|
+
# Validates project structure before allowing commits
|
|
1227
|
+
# Remove with: npx ultra-dex hooks --remove
|
|
1228
|
+
|
|
1229
|
+
echo "š Ultra-Dex: Validating project structure..."
|
|
1230
|
+
|
|
1231
|
+
# Run validation
|
|
1232
|
+
npx ultra-dex validate --dir . > /tmp/ultra-dex-validate.log 2>&1
|
|
1233
|
+
RESULT=$?
|
|
1234
|
+
|
|
1235
|
+
if [ $RESULT -ne 0 ]; then
|
|
1236
|
+
echo ""
|
|
1237
|
+
echo "ā Ultra-Dex validation failed. Commit blocked."
|
|
1238
|
+
echo ""
|
|
1239
|
+
echo "Run 'npx ultra-dex validate' to see details."
|
|
1240
|
+
echo "Fix issues or bypass with: git commit --no-verify"
|
|
1241
|
+
echo ""
|
|
1242
|
+
exit 1
|
|
1243
|
+
fi
|
|
1244
|
+
|
|
1245
|
+
# Check for required files
|
|
1246
|
+
if [ ! -f "QUICK-START.md" ]; then
|
|
1247
|
+
echo "ā ļø Warning: QUICK-START.md not found"
|
|
1248
|
+
fi
|
|
1249
|
+
|
|
1250
|
+
if [ ! -f "IMPLEMENTATION-PLAN.md" ]; then
|
|
1251
|
+
echo "ā ļø Warning: IMPLEMENTATION-PLAN.md not found"
|
|
1252
|
+
fi
|
|
1253
|
+
|
|
1254
|
+
echo "ā
Ultra-Dex validation passed."
|
|
1255
|
+
exit 0
|
|
1256
|
+
`;
|
|
1257
|
+
|
|
1258
|
+
// Check if pre-commit already exists
|
|
1259
|
+
try {
|
|
1260
|
+
const existing = await fs.readFile(preCommitPath, 'utf-8');
|
|
1261
|
+
if (existing.includes('ultra-dex')) {
|
|
1262
|
+
console.log(chalk.yellow('ā ļø Ultra-Dex pre-commit hook already exists.\n'));
|
|
1263
|
+
console.log(chalk.gray(' Use --remove to remove it first.\n'));
|
|
1264
|
+
return;
|
|
1265
|
+
} else {
|
|
1266
|
+
// Append to existing hook
|
|
1267
|
+
const combined = existing + '\n\n' + preCommitScript;
|
|
1268
|
+
await fs.writeFile(preCommitPath, combined);
|
|
1269
|
+
await fs.chmod(preCommitPath, '755');
|
|
1270
|
+
console.log(chalk.green('ā
Ultra-Dex hook appended to existing pre-commit.\n'));
|
|
1271
|
+
}
|
|
1272
|
+
} catch {
|
|
1273
|
+
// No existing hook, create new
|
|
1274
|
+
await fs.writeFile(preCommitPath, preCommitScript);
|
|
1275
|
+
await fs.chmod(preCommitPath, '755');
|
|
1276
|
+
console.log(chalk.green('ā
Pre-commit hook installed.\n'));
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
console.log(chalk.bold('What this does:\n'));
|
|
1280
|
+
console.log(chalk.gray(' ⢠Runs "ultra-dex validate" before each commit'));
|
|
1281
|
+
console.log(chalk.gray(' ⢠Blocks commits if required files are missing'));
|
|
1282
|
+
console.log(chalk.gray(' ⢠Warns about incomplete sections\n'));
|
|
1283
|
+
|
|
1284
|
+
console.log(chalk.bold('To bypass (not recommended):\n'));
|
|
1285
|
+
console.log(chalk.cyan(' git commit --no-verify\n'));
|
|
1286
|
+
|
|
1287
|
+
console.log(chalk.bold('To remove:\n'));
|
|
1288
|
+
console.log(chalk.cyan(' npx ultra-dex hooks --remove\n'));
|
|
1289
|
+
});
|
|
1290
|
+
|
|
1291
|
+
// ========================================
|
|
1292
|
+
// FETCH COMMAND - Offline Mode Support
|
|
1293
|
+
// ========================================
|
|
1294
|
+
program
|
|
1295
|
+
.command('fetch')
|
|
1296
|
+
.description('Download all Ultra-Dex assets for offline use')
|
|
1297
|
+
.option('-d, --dir <directory>', 'Target directory', '.ultra-dex')
|
|
1298
|
+
.option('--agents', 'Fetch only agent prompts')
|
|
1299
|
+
.option('--rules', 'Fetch only cursor rules')
|
|
1300
|
+
.option('--docs', 'Fetch only documentation')
|
|
1301
|
+
.action(async (options) => {
|
|
1302
|
+
console.log(chalk.cyan('\nš¦ Ultra-Dex Asset Fetcher\n'));
|
|
1303
|
+
|
|
1304
|
+
const targetDir = path.resolve(options.dir);
|
|
1305
|
+
const fetchAll = !options.agents && !options.rules && !options.docs;
|
|
1306
|
+
|
|
1307
|
+
// GitHub raw URLs
|
|
1308
|
+
const GITHUB_RAW = 'https://raw.githubusercontent.com/Srujan0798/Ultra-Dex/main';
|
|
1309
|
+
|
|
1310
|
+
// Helper to download a file
|
|
1311
|
+
async function downloadFile(url, destPath) {
|
|
1312
|
+
try {
|
|
1313
|
+
const response = await fetch(url);
|
|
1314
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
1315
|
+
const content = await response.text();
|
|
1316
|
+
await fs.mkdir(path.dirname(destPath), { recursive: true });
|
|
1317
|
+
await fs.writeFile(destPath, content);
|
|
1318
|
+
return true;
|
|
1319
|
+
} catch (err) {
|
|
1320
|
+
return false;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
const spinner = ora('Preparing to fetch assets...').start();
|
|
1325
|
+
|
|
1326
|
+
// Create target directory
|
|
1327
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
1328
|
+
|
|
1329
|
+
let downloaded = 0;
|
|
1330
|
+
let failed = 0;
|
|
1331
|
+
|
|
1332
|
+
// Fetch cursor rules
|
|
1333
|
+
if (fetchAll || options.rules) {
|
|
1334
|
+
spinner.text = 'Fetching cursor rules...';
|
|
1335
|
+
const rulesDir = path.join(targetDir, 'cursor-rules');
|
|
1336
|
+
await fs.mkdir(rulesDir, { recursive: true });
|
|
1337
|
+
|
|
1338
|
+
const ruleFiles = [
|
|
1339
|
+
'00-ultra-dex-core.mdc',
|
|
1340
|
+
'01-database.mdc',
|
|
1341
|
+
'02-api.mdc',
|
|
1342
|
+
'03-auth.mdc',
|
|
1343
|
+
'04-frontend.mdc',
|
|
1344
|
+
'05-payments.mdc',
|
|
1345
|
+
'06-testing.mdc',
|
|
1346
|
+
'07-security.mdc',
|
|
1347
|
+
'08-deployment.mdc',
|
|
1348
|
+
'09-error-handling.mdc',
|
|
1349
|
+
'10-performance.mdc',
|
|
1350
|
+
'11-nextjs-v15.mdc',
|
|
1351
|
+
'12-multi-tenancy.mdc',
|
|
1352
|
+
];
|
|
1353
|
+
|
|
1354
|
+
for (const file of ruleFiles) {
|
|
1355
|
+
const url = `${GITHUB_RAW}/cursor-rules/${file}`;
|
|
1356
|
+
const dest = path.join(rulesDir, file);
|
|
1357
|
+
if (await downloadFile(url, dest)) {
|
|
1358
|
+
downloaded++;
|
|
1359
|
+
} else {
|
|
1360
|
+
failed++;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// Also fetch load.sh
|
|
1365
|
+
await downloadFile(`${GITHUB_RAW}/cursor-rules/load.sh`, path.join(rulesDir, 'load.sh'));
|
|
1366
|
+
try {
|
|
1367
|
+
await fs.chmod(path.join(rulesDir, 'load.sh'), '755');
|
|
1368
|
+
} catch {}
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
// Fetch agent prompts
|
|
1372
|
+
if (fetchAll || options.agents) {
|
|
1373
|
+
spinner.text = 'Fetching agent prompts...';
|
|
1374
|
+
const agentsDir = path.join(targetDir, 'agents');
|
|
1375
|
+
|
|
1376
|
+
const agentPaths = [
|
|
1377
|
+
'00-AGENT_INDEX.md',
|
|
1378
|
+
'README.md',
|
|
1379
|
+
'AGENT-INSTRUCTIONS.md',
|
|
1380
|
+
'0-orchestration/orchestrator.md',
|
|
1381
|
+
'1-leadership/cto.md',
|
|
1382
|
+
'1-leadership/planner.md',
|
|
1383
|
+
'1-leadership/research.md',
|
|
1384
|
+
'2-development/backend.md',
|
|
1385
|
+
'2-development/frontend.md',
|
|
1386
|
+
'2-development/database.md',
|
|
1387
|
+
'3-security/security.md',
|
|
1388
|
+
'4-devops/devops.md',
|
|
1389
|
+
'5-quality/reviewer.md',
|
|
1390
|
+
'5-quality/testing.md',
|
|
1391
|
+
'5-quality/debugger.md',
|
|
1392
|
+
'6-specialist/performance.md',
|
|
1393
|
+
'6-specialist/refactoring.md',
|
|
1394
|
+
'6-specialist/documentation.md',
|
|
1395
|
+
];
|
|
1396
|
+
|
|
1397
|
+
for (const agentPath of agentPaths) {
|
|
1398
|
+
const url = `${GITHUB_RAW}/agents/${agentPath}`;
|
|
1399
|
+
const dest = path.join(agentsDir, agentPath);
|
|
1400
|
+
if (await downloadFile(url, dest)) {
|
|
1401
|
+
downloaded++;
|
|
1402
|
+
} else {
|
|
1403
|
+
failed++;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
// Fetch documentation
|
|
1409
|
+
if (fetchAll || options.docs) {
|
|
1410
|
+
spinner.text = 'Fetching documentation...';
|
|
1411
|
+
const docsDir = path.join(targetDir, 'docs');
|
|
1412
|
+
|
|
1413
|
+
const docFiles = [
|
|
1414
|
+
'VERIFICATION.md',
|
|
1415
|
+
'BUILD-AUTH-30M.md',
|
|
1416
|
+
'QUICK-REFERENCE.md',
|
|
1417
|
+
'TROUBLESHOOTING.md',
|
|
1418
|
+
];
|
|
1419
|
+
|
|
1420
|
+
for (const file of docFiles) {
|
|
1421
|
+
const url = `${GITHUB_RAW}/docs/${file}`;
|
|
1422
|
+
const dest = path.join(docsDir, file);
|
|
1423
|
+
if (await downloadFile(url, dest)) {
|
|
1424
|
+
downloaded++;
|
|
1425
|
+
} else {
|
|
1426
|
+
failed++;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
// Fetch guides
|
|
1431
|
+
const guidesDir = path.join(targetDir, 'guides');
|
|
1432
|
+
const guideFiles = [
|
|
1433
|
+
'PROJECT-ORCHESTRATION.md',
|
|
1434
|
+
'ADVANCED-WORKFLOWS.md',
|
|
1435
|
+
'DATABASE-DECISION-FRAMEWORK.md',
|
|
1436
|
+
'ARCHITECTURE-PATTERNS.md',
|
|
1437
|
+
];
|
|
1438
|
+
|
|
1439
|
+
for (const file of guideFiles) {
|
|
1440
|
+
const url = `${GITHUB_RAW}/guides/${file}`;
|
|
1441
|
+
const dest = path.join(guidesDir, file);
|
|
1442
|
+
if (await downloadFile(url, dest)) {
|
|
1443
|
+
downloaded++;
|
|
1444
|
+
} else {
|
|
1445
|
+
failed++;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
if (failed === 0) {
|
|
1451
|
+
spinner.succeed(chalk.green(`Downloaded ${downloaded} files to ${targetDir}`));
|
|
1452
|
+
} else {
|
|
1453
|
+
spinner.warn(chalk.yellow(`Downloaded ${downloaded} files, ${failed} failed`));
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
console.log(chalk.bold('\nš Assets downloaded to:\n'));
|
|
1457
|
+
if (fetchAll || options.rules) {
|
|
1458
|
+
console.log(chalk.gray(` ${targetDir}/cursor-rules/ (12 .mdc files)`));
|
|
1459
|
+
}
|
|
1460
|
+
if (fetchAll || options.agents) {
|
|
1461
|
+
console.log(chalk.gray(` ${targetDir}/agents/ (16 agent prompts)`));
|
|
1462
|
+
}
|
|
1463
|
+
if (fetchAll || options.docs) {
|
|
1464
|
+
console.log(chalk.gray(` ${targetDir}/docs/ (documentation)`));
|
|
1465
|
+
console.log(chalk.gray(` ${targetDir}/guides/ (guides)`));
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
console.log(chalk.bold('\nš” Usage:\n'));
|
|
1469
|
+
console.log(chalk.cyan(' # Copy cursor rules to project'));
|
|
1470
|
+
console.log(chalk.gray(` cp -r ${targetDir}/cursor-rules .cursor/rules`));
|
|
1471
|
+
console.log(chalk.cyan('\n # Copy agents to project'));
|
|
1472
|
+
console.log(chalk.gray(` cp -r ${targetDir}/agents .agents`));
|
|
1473
|
+
console.log(chalk.cyan('\n # Works offline now!'));
|
|
1474
|
+
console.log(chalk.gray(' No GitHub access needed after fetch.\n'));
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1093
1477
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra-dex",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"description": "CLI for Ultra-Dex SaaS Implementation Framework with
|
|
3
|
+
"version": "1.7.3",
|
|
4
|
+
"description": "CLI for Ultra-Dex SaaS Implementation Framework with 16 Production Agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"saas",
|
|
7
7
|
"template",
|