@valentia-ai-skills/framework 2.0.3 → 2.0.5
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 +46 -16
- package/bin/cli.js +165 -31
- package/package.json +1 -1
- package/skills/global/aisupportapp-project-architecture/SKILL.md +1 -1
- package/skills/global/aisupportapp-project-conventions/SKILL.md +1 -1
- package/skills/global/aisupportapp-project-workflows/SKILL.md +1 -1
- package/skills/global/aisupportapp-test-installation/SKILL.md +1 -1
- package/skills/global/api-design/SKILL.md +1 -1
- package/skills/global/appointment-oas-app/SKILL.md +1 -1
- package/skills/global/code-standards/SKILL.md +1 -1
- package/skills/global/codebase-legacy-intelligence/SKILL.md +1 -1
- package/skills/global/project-scanner/SKILL.md +1 -1
- package/skills/global/viteapp-core-workflows/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -65,16 +65,28 @@ npx ai-skills help # Show help
|
|
|
65
65
|
#### Legacy Codebase Intelligence Scanner
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
#
|
|
69
|
-
npx ai-skills
|
|
68
|
+
# Add / refresh a project by uploading a scan intelligence package
|
|
69
|
+
npx ai-skills legacy-projects add --path ./my-project-intelligence/
|
|
70
70
|
|
|
71
|
-
# Validate the
|
|
72
|
-
npx ai-skills
|
|
71
|
+
# Validate the payload without uploading (dry run)
|
|
72
|
+
npx ai-skills legacy-projects add --path ./my-project-intelligence/ --dry-run
|
|
73
73
|
|
|
74
74
|
# Supply an explicit auth token instead of going through OTP
|
|
75
|
-
npx ai-skills
|
|
75
|
+
npx ai-skills legacy-projects add --path ./my-project-intelligence/ --token <your-token>
|
|
76
|
+
|
|
77
|
+
# List all legacy projects for your team
|
|
78
|
+
npx ai-skills legacy-projects list
|
|
79
|
+
|
|
80
|
+
# Show detailed status + document counts for a project
|
|
81
|
+
npx ai-skills legacy-projects status "My Project"
|
|
82
|
+
|
|
83
|
+
# Delete a project and all its documents (irreversible — prompts for confirmation)
|
|
84
|
+
npx ai-skills legacy-projects remove "My Project"
|
|
76
85
|
```
|
|
77
86
|
|
|
87
|
+
> `upload-legacy-scan` is also available as a direct alias:
|
|
88
|
+
> `npx ai-skills upload-legacy-scan --path ./my-project-intelligence/`
|
|
89
|
+
|
|
78
90
|
The `--path` directory must contain a `manifest.json` file. See the [Legacy Scanner](#legacy-codebase-intelligence-scanner) section below for the required format.
|
|
79
91
|
|
|
80
92
|
### Environment Variables
|
|
@@ -85,6 +97,7 @@ The `--path` directory must contain a `manifest.json` file. See the [Legacy Scan
|
|
|
85
97
|
| `AI_SKILLS_ANALYZE_URL` | Override the analyze commit function URL |
|
|
86
98
|
| `AI_SKILLS_SCAN_URL` | Override the scan results function URL |
|
|
87
99
|
| `AI_SKILLS_UPLOAD_LEGACY_URL` | Override the upload-legacy-scan Edge Function URL |
|
|
100
|
+
| `AI_SKILLS_MANAGE_LEGACY_URL` | Override the manage-legacy-projects Edge Function URL |
|
|
88
101
|
|
|
89
102
|
---
|
|
90
103
|
|
|
@@ -276,9 +289,10 @@ The framework supports ingesting intelligence packages generated by legacy codeb
|
|
|
276
289
|
### How It Works
|
|
277
290
|
|
|
278
291
|
1. **Scan** — A compatible scanner tool analyses an existing codebase and produces an intelligence folder
|
|
279
|
-
2. **
|
|
280
|
-
3. **Review** — Tech leads review auto-generated skills,
|
|
281
|
-
4. **
|
|
292
|
+
2. **Add** — `npx ai-skills legacy-projects add --path <folder>` uploads the package, creating the project if it doesn't exist or replacing its documents if it does
|
|
293
|
+
3. **Review** — Tech leads review auto-generated skills, reports, and diagrams in the Skills Console, approving or flagging each document
|
|
294
|
+
4. **Promote** — Approved skills are promoted into the team's active toolkit and distributed on the next `npx ai-skills update`
|
|
295
|
+
5. **Rescan** — Re-running `add` on the same project name replaces all documents with the latest scan output
|
|
282
296
|
|
|
283
297
|
### Intelligence Package Format
|
|
284
298
|
|
|
@@ -318,18 +332,34 @@ my-project-intelligence/
|
|
|
318
332
|
|
|
319
333
|
### Skills Console — Legacy Scanners View
|
|
320
334
|
|
|
321
|
-
After upload, each project appears in the **Legacy Scanners** section of the Skills Console with:
|
|
335
|
+
After upload, each project appears in the **Legacy Scanners** section of the Skills Console with five tabs:
|
|
322
336
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
337
|
+
| Tab | Contents |
|
|
338
|
+
|-----|----------|
|
|
339
|
+
| **Overview** | Project stats, completeness score, tech stack, interactive reproduction guide |
|
|
340
|
+
| **Skills** | Per-skill approval workflow — approve or flag each extracted skill |
|
|
341
|
+
| **Reports** | Searchable reports: API registry, business rules, data models, risk report, etc. |
|
|
342
|
+
| **Architecture** | Interactive Mermaid architecture and ER diagrams |
|
|
343
|
+
| **All Files** | Full document list with category filter + content copy |
|
|
330
344
|
|
|
331
345
|
Approved skills are promoted into the team's standard toolkit and distributed on the next `npx ai-skills update`.
|
|
332
346
|
|
|
347
|
+
### Managing Projects from the CLI
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
# Add a new project (or refresh an existing one)
|
|
351
|
+
npx ai-skills legacy-projects add --path ./my-project-intelligence/
|
|
352
|
+
|
|
353
|
+
# List all projects with status, module count, and completeness score
|
|
354
|
+
npx ai-skills legacy-projects list
|
|
355
|
+
|
|
356
|
+
# Inspect a specific project — shows document counts per category
|
|
357
|
+
npx ai-skills legacy-projects status "My Project"
|
|
358
|
+
|
|
359
|
+
# Permanently delete a project and all its documents
|
|
360
|
+
npx ai-skills legacy-projects remove "My Project"
|
|
361
|
+
```
|
|
362
|
+
|
|
333
363
|
---
|
|
334
364
|
|
|
335
365
|
## Architecture
|
package/bin/cli.js
CHANGED
|
@@ -1415,18 +1415,23 @@ async function cmdUploadLegacyScan() {
|
|
|
1415
1415
|
|
|
1416
1416
|
// ── Read skill files ──
|
|
1417
1417
|
const skillPayload = [];
|
|
1418
|
+
let modulePriority = 1;
|
|
1418
1419
|
for (const skillEntry of (manifest.skills || [])) {
|
|
1419
|
-
const skillFile = skillEntry.file || skillEntry.path;
|
|
1420
|
+
const skillFile = skillEntry.file || skillEntry.path;
|
|
1420
1421
|
if (!skillEntry.name || !skillFile) continue;
|
|
1421
1422
|
const skillFilePath = path.join(resolvedPath, skillFile);
|
|
1422
1423
|
if (!fs.existsSync(skillFilePath)) {
|
|
1423
1424
|
console.log(c("yellow", ` ⚠ Skill file not found: ${skillFile} — skipping`));
|
|
1424
1425
|
continue;
|
|
1425
1426
|
}
|
|
1427
|
+
const isMaster = (skillEntry.type || "module") === "master";
|
|
1426
1428
|
skillPayload.push({
|
|
1429
|
+
category: "skill",
|
|
1430
|
+
document_type: isMaster ? "master" : "module",
|
|
1427
1431
|
name: skillEntry.name,
|
|
1428
|
-
type: skillEntry.type || "module",
|
|
1429
1432
|
content: fs.readFileSync(skillFilePath, "utf-8"),
|
|
1433
|
+
priority: isMaster ? 0 : modulePriority++,
|
|
1434
|
+
metadata: {},
|
|
1430
1435
|
});
|
|
1431
1436
|
}
|
|
1432
1437
|
console.log(`Skills: ${c("green", skillPayload.length.toString())} module(s)`);
|
|
@@ -1434,7 +1439,7 @@ async function cmdUploadLegacyScan() {
|
|
|
1434
1439
|
// ── Read diagram files ──
|
|
1435
1440
|
const diagramPayload = [];
|
|
1436
1441
|
for (const diagramEntry of (manifest.diagrams || [])) {
|
|
1437
|
-
const diagramFile = diagramEntry.file || diagramEntry.path;
|
|
1442
|
+
const diagramFile = diagramEntry.file || diagramEntry.path;
|
|
1438
1443
|
if (!diagramEntry.name || !diagramFile) continue;
|
|
1439
1444
|
const diagramFilePath = path.join(resolvedPath, diagramFile);
|
|
1440
1445
|
if (!fs.existsSync(diagramFilePath)) {
|
|
@@ -1442,9 +1447,12 @@ async function cmdUploadLegacyScan() {
|
|
|
1442
1447
|
continue;
|
|
1443
1448
|
}
|
|
1444
1449
|
diagramPayload.push({
|
|
1450
|
+
category: "diagram",
|
|
1451
|
+
document_type: diagramEntry.type || "architecture",
|
|
1445
1452
|
name: diagramEntry.name,
|
|
1446
|
-
type: diagramEntry.type || "architecture",
|
|
1447
1453
|
content: fs.readFileSync(diagramFilePath, "utf-8"),
|
|
1454
|
+
priority: 0,
|
|
1455
|
+
metadata: {},
|
|
1448
1456
|
});
|
|
1449
1457
|
}
|
|
1450
1458
|
// Auto-discover .mmd/.mermaid files from diagrams/ subdirectory if manifest listed none
|
|
@@ -1455,9 +1463,12 @@ async function cmdUploadLegacyScan() {
|
|
|
1455
1463
|
if (/\.(mmd|mermaid)$/i.test(file)) {
|
|
1456
1464
|
const name = file.replace(/\.(mmd|mermaid)$/i, "");
|
|
1457
1465
|
diagramPayload.push({
|
|
1466
|
+
category: "diagram",
|
|
1467
|
+
document_type: "architecture",
|
|
1458
1468
|
name,
|
|
1459
|
-
type: "architecture",
|
|
1460
1469
|
content: fs.readFileSync(path.join(diagramsDir, file), "utf-8"),
|
|
1470
|
+
priority: 0,
|
|
1471
|
+
metadata: {},
|
|
1461
1472
|
});
|
|
1462
1473
|
}
|
|
1463
1474
|
}
|
|
@@ -1468,17 +1479,18 @@ async function cmdUploadLegacyScan() {
|
|
|
1468
1479
|
}
|
|
1469
1480
|
console.log(`Diagrams: ${c("green", diagramPayload.length.toString())} file(s)`);
|
|
1470
1481
|
|
|
1471
|
-
// ── Read report files ──
|
|
1472
|
-
const
|
|
1482
|
+
// ── Read report/guide files ──
|
|
1483
|
+
const GUIDE_TYPES = new Set(["overview", "reproduction_guide"]);
|
|
1484
|
+
const reportPayload = [];
|
|
1473
1485
|
const reportFileMap = {
|
|
1474
|
-
overview:
|
|
1475
|
-
api_registry:
|
|
1476
|
-
business_rules:
|
|
1477
|
-
data_models:
|
|
1478
|
-
dependencies:
|
|
1479
|
-
env_config:
|
|
1480
|
-
risk_report:
|
|
1481
|
-
glossary:
|
|
1486
|
+
overview: ["OVERVIEW.md", "overview.md"],
|
|
1487
|
+
api_registry: ["API_REGISTRY.md", "api_registry.md"],
|
|
1488
|
+
business_rules: ["BUSINESS_RULES.md", "business_rules.md"],
|
|
1489
|
+
data_models: ["DATA_MODELS.md", "data_models.md"],
|
|
1490
|
+
dependencies: ["DEPENDENCIES.md", "dependencies.md"],
|
|
1491
|
+
env_config: ["ENV_CONFIG.md", "env_config.md"],
|
|
1492
|
+
risk_report: ["RISK_REPORT.md", "risk_report.md"],
|
|
1493
|
+
glossary: ["GLOSSARY.md", "glossary.md"],
|
|
1482
1494
|
reproduction_guide: ["REPRODUCTION_GUIDE.md", "reproduction_guide.md"],
|
|
1483
1495
|
};
|
|
1484
1496
|
|
|
@@ -1490,23 +1502,36 @@ async function cmdUploadLegacyScan() {
|
|
|
1490
1502
|
];
|
|
1491
1503
|
const found = reportPaths.find((p) => fs.existsSync(p));
|
|
1492
1504
|
if (found) {
|
|
1493
|
-
|
|
1505
|
+
const isGuide = GUIDE_TYPES.has(key);
|
|
1506
|
+
const displayName = key.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
1507
|
+
reportPayload.push({
|
|
1508
|
+
category: isGuide ? "guide" : "report",
|
|
1509
|
+
document_type: key,
|
|
1510
|
+
name: displayName,
|
|
1511
|
+
content: fs.readFileSync(found, "utf-8"),
|
|
1512
|
+
priority: 0,
|
|
1513
|
+
metadata: {},
|
|
1514
|
+
});
|
|
1494
1515
|
break;
|
|
1495
1516
|
}
|
|
1496
1517
|
}
|
|
1497
1518
|
}
|
|
1498
1519
|
|
|
1499
|
-
const reportCount =
|
|
1520
|
+
const reportCount = reportPayload.length;
|
|
1500
1521
|
console.log(`Reports: ${c("green", reportCount.toString())} file(s)\n`);
|
|
1501
1522
|
|
|
1523
|
+
// ── Build unified documents array ──
|
|
1524
|
+
const documentsPayload = [...skillPayload, ...diagramPayload, ...reportPayload];
|
|
1525
|
+
|
|
1502
1526
|
// ── Dry run: print summary and exit ──
|
|
1503
1527
|
if (dryRun) {
|
|
1504
1528
|
console.log(c("yellow", "Dry run — payload summary:"));
|
|
1505
1529
|
const stats = manifest.statistics || {};
|
|
1506
1530
|
console.log(` Project name: ${projectName}`);
|
|
1507
|
-
console.log(`
|
|
1508
|
-
console.log(`
|
|
1509
|
-
console.log(`
|
|
1531
|
+
console.log(` Documents total: ${documentsPayload.length}`);
|
|
1532
|
+
console.log(` — Skills: ${skillPayload.length}`);
|
|
1533
|
+
console.log(` — Diagrams: ${diagramPayload.length}`);
|
|
1534
|
+
console.log(` — Reports/Guides: ${reportCount}`);
|
|
1510
1535
|
if (stats.completeness_score !== undefined) {
|
|
1511
1536
|
console.log(` Completeness: ${stats.completeness_score}%`);
|
|
1512
1537
|
}
|
|
@@ -1526,13 +1551,13 @@ async function cmdUploadLegacyScan() {
|
|
|
1526
1551
|
email = await ask(`${c("bold", "Work email:")} `);
|
|
1527
1552
|
const otpResult = await requestOtpForEmail(email);
|
|
1528
1553
|
email = otpResult.email;
|
|
1529
|
-
await verifyOtp(email);
|
|
1554
|
+
await verifyOtp(email);
|
|
1530
1555
|
}
|
|
1531
1556
|
}
|
|
1532
1557
|
|
|
1533
1558
|
// ── Upload ──
|
|
1534
1559
|
console.log(c("dim", `Uploading to Valentia (${projectName})...\n`));
|
|
1535
|
-
process.stdout.write(` ${c("dim", "→")} Sending ${skillPayload.length} skills, ${diagramPayload.length} diagrams, ${reportCount} reports...`);
|
|
1560
|
+
process.stdout.write(` ${c("dim", "→")} Sending ${documentsPayload.length} documents (${skillPayload.length} skills, ${diagramPayload.length} diagrams, ${reportCount} reports)...`);
|
|
1536
1561
|
|
|
1537
1562
|
let result;
|
|
1538
1563
|
try {
|
|
@@ -1541,9 +1566,7 @@ async function cmdUploadLegacyScan() {
|
|
|
1541
1566
|
{
|
|
1542
1567
|
project_name: projectName,
|
|
1543
1568
|
manifest,
|
|
1544
|
-
|
|
1545
|
-
diagrams: diagramPayload,
|
|
1546
|
-
reports: reportsPayload,
|
|
1569
|
+
documents: documentsPayload,
|
|
1547
1570
|
email,
|
|
1548
1571
|
},
|
|
1549
1572
|
authToken
|
|
@@ -1558,12 +1581,9 @@ async function cmdUploadLegacyScan() {
|
|
|
1558
1581
|
|
|
1559
1582
|
console.log(c("green", "✓ Upload complete!\n"));
|
|
1560
1583
|
console.log(` Project ID: ${c("bold", result.project_id)}`);
|
|
1561
|
-
console.log(`
|
|
1562
|
-
if (result.
|
|
1563
|
-
console.log(`
|
|
1564
|
-
}
|
|
1565
|
-
if (result.storage_urls?.reports?.length) {
|
|
1566
|
-
console.log(` Reports stored: ${c("dim", result.storage_urls.reports.length.toString())}`);
|
|
1584
|
+
console.log(` Documents created: ${c("bold", (result.documents_created || 0).toString())}`);
|
|
1585
|
+
if (result.skills_count > 0) {
|
|
1586
|
+
console.log(` Skills: ${c("dim", result.skills_count.toString())}`);
|
|
1567
1587
|
}
|
|
1568
1588
|
if (result.console_url) {
|
|
1569
1589
|
console.log(`\n View in console: ${c("bold", result.console_url)}`);
|
|
@@ -1571,6 +1591,115 @@ async function cmdUploadLegacyScan() {
|
|
|
1571
1591
|
console.log("");
|
|
1572
1592
|
}
|
|
1573
1593
|
|
|
1594
|
+
// ── Legacy Projects Command ──
|
|
1595
|
+
|
|
1596
|
+
const MANAGE_LEGACY_PROJECTS_URL =
|
|
1597
|
+
process.env.AI_SKILLS_MANAGE_LEGACY_URL ||
|
|
1598
|
+
"https://znshdhjquohrzvbnloki.supabase.co/functions/v1/manage-legacy-projects";
|
|
1599
|
+
|
|
1600
|
+
async function cmdLegacyProjects() {
|
|
1601
|
+
const subcommand = process.argv[3] || "list";
|
|
1602
|
+
const args = process.argv.slice(4);
|
|
1603
|
+
|
|
1604
|
+
// Resolve email
|
|
1605
|
+
const config = loadConfig();
|
|
1606
|
+
let email = config?.email;
|
|
1607
|
+
if (!email) {
|
|
1608
|
+
console.log(c("yellow", "No saved config. Run 'npx ai-skills setup' first."));
|
|
1609
|
+
process.exit(1);
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
if (subcommand === "list") {
|
|
1613
|
+
console.log(c("blue", "\n━━━ Legacy Projects ━━━\n"));
|
|
1614
|
+
let result;
|
|
1615
|
+
try {
|
|
1616
|
+
result = await fetchJSONWithAuth(MANAGE_LEGACY_PROJECTS_URL, { action: "list", email }, null);
|
|
1617
|
+
} catch (err) {
|
|
1618
|
+
console.log(c("red", `✗ ${err.message}`));
|
|
1619
|
+
process.exit(1);
|
|
1620
|
+
}
|
|
1621
|
+
const projects = result.projects || [];
|
|
1622
|
+
if (projects.length === 0) {
|
|
1623
|
+
console.log(c("dim", "No legacy projects found.\n"));
|
|
1624
|
+
return;
|
|
1625
|
+
}
|
|
1626
|
+
for (const p of projects) {
|
|
1627
|
+
const statusColor = p.status === "fully_approved" ? "green" : p.status === "partially_approved" ? "yellow" : "dim";
|
|
1628
|
+
const scanDate = p.last_scanned_at ? new Date(p.last_scanned_at).toLocaleDateString() : "?";
|
|
1629
|
+
console.log(` ${c("bold", p.name)}`);
|
|
1630
|
+
console.log(` Status: ${c(statusColor, p.status)} | ${p.module_count} modules | ${p.completeness_score}% | Scanned: ${scanDate}`);
|
|
1631
|
+
console.log(` ${c("dim", p.console_url)}`);
|
|
1632
|
+
console.log("");
|
|
1633
|
+
}
|
|
1634
|
+
console.log(c("dim", ` ${projects.length} project(s)\n`));
|
|
1635
|
+
|
|
1636
|
+
} else if (subcommand === "status") {
|
|
1637
|
+
const projectName = args[0];
|
|
1638
|
+
if (!projectName) {
|
|
1639
|
+
console.log(c("red", "Usage: npx ai-skills legacy-projects status <project-name>"));
|
|
1640
|
+
process.exit(1);
|
|
1641
|
+
}
|
|
1642
|
+
console.log(c("blue", `\n━━━ Legacy Project: ${projectName} ━━━\n`));
|
|
1643
|
+
let result;
|
|
1644
|
+
try {
|
|
1645
|
+
result = await fetchJSONWithAuth(MANAGE_LEGACY_PROJECTS_URL, { action: "status", email, project_name: projectName }, null);
|
|
1646
|
+
} catch (err) {
|
|
1647
|
+
console.log(c("red", `✗ ${err.message}`));
|
|
1648
|
+
process.exit(1);
|
|
1649
|
+
}
|
|
1650
|
+
const p = result.project;
|
|
1651
|
+
const docs = result.documents || {};
|
|
1652
|
+
const statusColor = p.status === "fully_approved" ? "green" : p.status === "partially_approved" ? "yellow" : "dim";
|
|
1653
|
+
console.log(` Project: ${c("bold", p.name)}`);
|
|
1654
|
+
console.log(` Status: ${c(statusColor, p.status)}`);
|
|
1655
|
+
console.log(` Completeness: ${p.completeness_score}%`);
|
|
1656
|
+
console.log(` Modules: ${p.module_count} | Endpoints: ${p.total_endpoints} | Rules: ${p.total_business_rules}`);
|
|
1657
|
+
console.log(` Scanned: ${p.last_scanned_at ? new Date(p.last_scanned_at).toLocaleDateString() : "?"}`);
|
|
1658
|
+
console.log("");
|
|
1659
|
+
if (Object.keys(docs).length > 0) {
|
|
1660
|
+
console.log(c("bold", " Documents:"));
|
|
1661
|
+
for (const [cat, counts] of Object.entries(docs)) {
|
|
1662
|
+
console.log(` ${cat.padEnd(10)} ${counts.total} total, ${counts.approved} approved, ${counts.pending} pending`);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
console.log(`\n Console: ${c("dim", p.console_url)}\n`);
|
|
1666
|
+
|
|
1667
|
+
} else if (subcommand === "add") {
|
|
1668
|
+
// Delegate to upload-legacy-scan — argv flags (--path, --dry-run, --token) are preserved
|
|
1669
|
+
await cmdUploadLegacyScan();
|
|
1670
|
+
return;
|
|
1671
|
+
|
|
1672
|
+
} else if (subcommand === "remove") {
|
|
1673
|
+
const projectName = args[0];
|
|
1674
|
+
if (!projectName) {
|
|
1675
|
+
console.log(c("red", "Usage: npx ai-skills legacy-projects remove <project-name>"));
|
|
1676
|
+
process.exit(1);
|
|
1677
|
+
}
|
|
1678
|
+
const confirm = await ask(`${c("red", `Delete "${projectName}" and all its documents? This cannot be undone. Type the project name to confirm: `)} `);
|
|
1679
|
+
if (confirm.trim() !== projectName) {
|
|
1680
|
+
console.log(c("yellow", "Cancelled.\n"));
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
let result;
|
|
1684
|
+
try {
|
|
1685
|
+
result = await fetchJSONWithAuth(MANAGE_LEGACY_PROJECTS_URL, { action: "remove", email, project_name: projectName }, null);
|
|
1686
|
+
} catch (err) {
|
|
1687
|
+
console.log(c("red", `✗ ${err.message}`));
|
|
1688
|
+
process.exit(1);
|
|
1689
|
+
}
|
|
1690
|
+
if (result.removed) {
|
|
1691
|
+
console.log(c("green", `✓ "${result.name}" deleted.\n`));
|
|
1692
|
+
} else {
|
|
1693
|
+
console.log(c("red", "Failed to delete project."));
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
} else {
|
|
1697
|
+
console.log(c("red", `Unknown subcommand: ${subcommand}`));
|
|
1698
|
+
console.log(c("dim", "Usage: npx ai-skills legacy-projects add --path <dir> | list | status <name> | remove <name>\n"));
|
|
1699
|
+
process.exit(1);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1574
1703
|
// ── Main ──
|
|
1575
1704
|
|
|
1576
1705
|
const command = process.argv[2] || "setup";
|
|
@@ -1583,6 +1712,7 @@ switch (command) {
|
|
|
1583
1712
|
case "doctor": cmdDoctor(); break;
|
|
1584
1713
|
case "analyze": cmdAnalyze(); break;
|
|
1585
1714
|
case "upload-legacy-scan": cmdUploadLegacyScan(); break;
|
|
1715
|
+
case "legacy-projects": cmdLegacyProjects(); break;
|
|
1586
1716
|
case "help": case "--help": case "-h":
|
|
1587
1717
|
console.log(`
|
|
1588
1718
|
${c("blue", "AI Skills Framework")} — @valentia-ai-skills/framework
|
|
@@ -1594,6 +1724,10 @@ Usage:
|
|
|
1594
1724
|
npx ai-skills list List locally bundled skills
|
|
1595
1725
|
npx ai-skills analyze Analyze last commit against active skills
|
|
1596
1726
|
npx ai-skills upload-legacy-scan Upload a legacy codebase intelligence package
|
|
1727
|
+
npx ai-skills legacy-projects add --path <dir> Upload a scan package and add / refresh the project
|
|
1728
|
+
npx ai-skills legacy-projects list List all legacy projects
|
|
1729
|
+
npx ai-skills legacy-projects status <name> Show project status and document counts
|
|
1730
|
+
npx ai-skills legacy-projects remove <name> Delete a project and all its documents
|
|
1597
1731
|
npx ai-skills doctor Health check (config + API + tools)
|
|
1598
1732
|
|
|
1599
1733
|
Flags:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valentia-ai-skills/framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "AI development skills framework centralized coding standards, security patterns, and SOPs for AI-assisted development. Works with Claude Code, Cursor, Copilot, Windsurf, and any AI coding tool.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-skills",
|