@aiready/cli 0.12.20 → 0.13.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.
Files changed (55) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/.turbo/turbo-lint.log +24 -5
  3. package/.turbo/turbo-test.log +66 -85
  4. package/coverage/base.css +224 -0
  5. package/coverage/block-navigation.js +87 -0
  6. package/coverage/clover.xml +865 -0
  7. package/coverage/coverage-final.json +15 -0
  8. package/coverage/favicon.png +0 -0
  9. package/coverage/index.html +146 -0
  10. package/coverage/prettify.css +1 -0
  11. package/coverage/prettify.js +2 -0
  12. package/coverage/sort-arrow-sprite.png +0 -0
  13. package/coverage/sorter.js +210 -0
  14. package/coverage/src/commands/agent-grounding.ts.html +271 -0
  15. package/coverage/src/commands/ai-signal-clarity.ts.html +253 -0
  16. package/coverage/src/commands/change-amplification.ts.html +94 -0
  17. package/coverage/src/commands/consistency.ts.html +781 -0
  18. package/coverage/src/commands/context.ts.html +871 -0
  19. package/coverage/src/commands/deps-health.ts.html +280 -0
  20. package/coverage/src/commands/doc-drift.ts.html +271 -0
  21. package/coverage/src/commands/index.html +281 -0
  22. package/coverage/src/commands/patterns.ts.html +745 -0
  23. package/coverage/src/commands/scan.ts.html +1393 -0
  24. package/coverage/src/commands/testability.ts.html +304 -0
  25. package/coverage/src/commands/upload.ts.html +466 -0
  26. package/coverage/src/commands/visualize.ts.html +1027 -0
  27. package/coverage/src/index.html +116 -0
  28. package/coverage/src/index.ts.html +1372 -0
  29. package/coverage/src/utils/helpers.ts.html +559 -0
  30. package/coverage/src/utils/index.html +116 -0
  31. package/dist/cli.js +259 -16
  32. package/dist/cli.mjs +259 -15
  33. package/package.json +13 -12
  34. package/src/.aiready/aiready-report-20260308-174006.json +29526 -0
  35. package/src/.aiready/aiready-report-20260310-153526.json +34441 -0
  36. package/src/.aiready/aiready-report-20260310-155555.json +34441 -0
  37. package/src/.aiready/aiready-report-20260310-162403.json +34441 -0
  38. package/src/.aiready/aiready-report-20260310-183821.json +34448 -0
  39. package/src/__tests__/unified.test.ts +95 -0
  40. package/src/cli.ts +86 -0
  41. package/src/commands/__tests__/agent-grounding.test.ts +24 -0
  42. package/src/commands/__tests__/ai-signal-clarity.test.ts +32 -0
  43. package/src/commands/__tests__/consistency.test.ts +97 -0
  44. package/src/commands/__tests__/deps-health.test.ts +26 -0
  45. package/src/commands/__tests__/doc-drift.test.ts +26 -0
  46. package/src/commands/__tests__/extra-commands.test.ts +177 -0
  47. package/src/commands/__tests__/scan.test.ts +151 -0
  48. package/src/commands/__tests__/testability.test.ts +36 -0
  49. package/src/commands/__tests__/upload.test.ts +51 -0
  50. package/src/commands/__tests__/visualize.test.ts +82 -0
  51. package/src/commands/clawmart.ts +162 -0
  52. package/src/commands/index.ts +8 -0
  53. package/src/commands/scan.ts +45 -13
  54. package/src/utils/__tests__/helpers.test.ts +35 -0
  55. package/vitest.config.ts +20 -0
@@ -0,0 +1,116 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for src/utils</title>
7
+ <meta charset="utf-8" />
8
+ <link rel="stylesheet" href="../../prettify.css" />
9
+ <link rel="stylesheet" href="../../base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <style type='text/css'>
13
+ .coverage-summary .sorter {
14
+ background-image: url(../../sort-arrow-sprite.png);
15
+ }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class='wrapper'>
21
+ <div class='pad1'>
22
+ <h1><a href="../../index.html">All files</a> src/utils</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">52.23% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>35/67</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">37.2% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>16/43</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">53.84% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>7/13</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">51.56% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>33/64</span>
50
+ </div>
51
+
52
+
53
+ </div>
54
+ <p class="quiet">
55
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line medium'></div>
65
+ <div class="pad1">
66
+ <table class="coverage-summary">
67
+ <thead>
68
+ <tr>
69
+ <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
70
+ <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
71
+ <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
72
+ <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
73
+ <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
74
+ <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
75
+ <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
76
+ <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
77
+ <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
78
+ <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
79
+ </tr>
80
+ </thead>
81
+ <tbody><tr>
82
+ <td class="file medium" data-value="helpers.ts"><a href="helpers.ts.html">helpers.ts</a></td>
83
+ <td data-value="52.23" class="pic medium">
84
+ <div class="chart"><div class="cover-fill" style="width: 52%"></div><div class="cover-empty" style="width: 48%"></div></div>
85
+ </td>
86
+ <td data-value="52.23" class="pct medium">52.23%</td>
87
+ <td data-value="67" class="abs medium">35/67</td>
88
+ <td data-value="37.2" class="pct low">37.2%</td>
89
+ <td data-value="43" class="abs low">16/43</td>
90
+ <td data-value="53.84" class="pct medium">53.84%</td>
91
+ <td data-value="13" class="abs medium">7/13</td>
92
+ <td data-value="51.56" class="pct medium">51.56%</td>
93
+ <td data-value="64" class="abs medium">33/64</td>
94
+ </tr>
95
+
96
+ </tbody>
97
+ </table>
98
+ </div>
99
+ <div class='push'></div><!-- for sticky footer -->
100
+ </div><!-- /wrapper -->
101
+ <div class='footer quiet pad2 space-top1 center small'>
102
+ Code coverage generated by
103
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
+ at 2026-03-09T03:44:16.153Z
105
+ </div>
106
+ <script src="../../prettify.js"></script>
107
+ <script>
108
+ window.onload = function () {
109
+ prettyPrint();
110
+ };
111
+ </script>
112
+ <script src="../../sorter.js"></script>
113
+ <script src="../../block-navigation.js"></script>
114
+ </body>
115
+ </html>
116
+
package/dist/cli.js CHANGED
@@ -25,8 +25,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
 
26
26
  // src/cli.ts
27
27
  var import_commander = require("commander");
28
- var import_fs6 = require("fs");
29
- var import_path8 = require("path");
28
+ var import_fs7 = require("fs");
29
+ var import_path9 = require("path");
30
30
  var import_url = require("url");
31
31
 
32
32
  // src/commands/scan.ts
@@ -690,26 +690,46 @@ async function scanAction(directory, options) {
690
690
  wastedTokens: {
691
691
  duplication: totalWastedDuplication,
692
692
  fragmentation: totalWastedFragmentation,
693
- chattiness: 0
693
+ chattiness: totalContext * 0.1
694
+ // Default chattiness
695
+ }
696
+ });
697
+ const allIssues = [];
698
+ for (const toolId of results.summary.toolsRun) {
699
+ if (results[toolId]?.results) {
700
+ results[toolId].results.forEach((fileRes) => {
701
+ if (fileRes.issues) {
702
+ allIssues.push(...fileRes.issues);
703
+ }
704
+ });
694
705
  }
706
+ }
707
+ const modelId = options.model || "claude-3-5-sonnet";
708
+ const roi = (await import("@aiready/core")).calculateBusinessROI({
709
+ tokenWaste: unifiedBudget.wastedTokens.total,
710
+ issues: allIssues,
711
+ modelId
695
712
  });
696
- const modelPreset = (0, import_core3.getModelPreset)(options.model || "claude-4.6");
697
- const costEstimate = (0, import_core3.estimateCostFromBudget)(unifiedBudget, modelPreset);
698
- console.log(import_chalk3.default.bold("\n\u{1F4CA} AI Token Budget Analysis"));
713
+ console.log(import_chalk3.default.bold("\n\u{1F4B0} Business Impact Analysis (Monthly)"));
699
714
  console.log(
700
- ` Efficiency: ${(unifiedBudget.efficiencyRatio * 100).toFixed(0)}%`
715
+ ` Potential Savings: ${import_chalk3.default.green(import_chalk3.default.bold("$" + roi.monthlySavings.toLocaleString()))}`
701
716
  );
702
717
  console.log(
703
- ` Wasted Tokens: ${import_chalk3.default.red(unifiedBudget.wastedTokens.total.toLocaleString())}`
718
+ ` Productivity Gain: ${import_chalk3.default.cyan(import_chalk3.default.bold(roi.productivityGainHours + "h"))} (est. dev time)`
704
719
  );
705
720
  console.log(
706
- ` Est. Monthly Cost (${modelPreset.name}): ${import_chalk3.default.bold("$" + costEstimate.total)}`
721
+ ` Context Efficiency: ${import_chalk3.default.yellow((unifiedBudget.efficiencyRatio * 100).toFixed(0) + "%")}`
707
722
  );
708
- scoringResult.tokenBudget = unifiedBudget;
709
- scoringResult.costEstimate = {
710
- model: modelPreset.name,
711
- ...costEstimate
723
+ console.log(
724
+ ` Annual Value: ${import_chalk3.default.bold("$" + roi.annualValue.toLocaleString())} (ROI Prediction)`
725
+ );
726
+ results.summary.businessImpact = {
727
+ estimatedMonthlyWaste: roi.monthlySavings,
728
+ potentialSavings: roi.monthlySavings,
729
+ productivityHours: roi.productivityGainHours
712
730
  };
731
+ scoringResult.tokenBudget = unifiedBudget;
732
+ scoringResult.businessROI = roi;
713
733
  }
714
734
  if (scoringResult.breakdown) {
715
735
  console.log(import_chalk3.default.bold("\nTool breakdown:"));
@@ -785,11 +805,20 @@ async function scanAction(directory, options) {
785
805
  const failOnLevel = options.failOn || "critical";
786
806
  let shouldFail = false;
787
807
  let failReason = "";
808
+ const report = mapToUnifiedReport(results, scoringResult);
809
+ if (report.results && report.results.length > 0) {
810
+ console.log(
811
+ import_chalk3.default.cyan(
812
+ `
813
+ \u{1F4DD} Emitting GitHub Action annotations for ${report.results.length} issues...`
814
+ )
815
+ );
816
+ (0, import_core3.emitIssuesAsAnnotations)(report.results);
817
+ }
788
818
  if (threshold && scoringResult.overall < threshold) {
789
819
  shouldFail = true;
790
820
  failReason = `Score ${scoringResult.overall} < threshold ${threshold}`;
791
821
  }
792
- const report = mapToUnifiedReport(results, scoringResult);
793
822
  if (failOnLevel !== "none") {
794
823
  if (failOnLevel === "critical" && report.summary.criticalIssues > 0) {
795
824
  shouldFail = true;
@@ -1585,18 +1614,213 @@ var import_core10 = require("@aiready/core");
1585
1614
  // src/commands/testability.ts
1586
1615
  var import_chalk10 = __toESM(require("chalk"));
1587
1616
  var import_core11 = require("@aiready/core");
1617
+ async function testabilityAction(directory, options) {
1618
+ const { analyzeTestability, calculateTestabilityScore } = await import("@aiready/testability");
1619
+ const config = await (0, import_core11.loadConfig)(directory);
1620
+ const merged = (0, import_core11.mergeConfigWithDefaults)(config, {
1621
+ minCoverageRatio: 0.3
1622
+ });
1623
+ const report = await analyzeTestability({
1624
+ rootDir: directory,
1625
+ minCoverageRatio: options.minCoverageRatio ?? merged.minCoverageRatio,
1626
+ include: options.include,
1627
+ exclude: options.exclude
1628
+ });
1629
+ const scoring = calculateTestabilityScore(report);
1630
+ if (options.output === "json") {
1631
+ return scoring;
1632
+ }
1633
+ const safetyIcons = {
1634
+ safe: "\u2705",
1635
+ "moderate-risk": "\u26A0\uFE0F ",
1636
+ "high-risk": "\u{1F534}",
1637
+ "blind-risk": "\u{1F480}"
1638
+ };
1639
+ const safetyColors = {
1640
+ safe: import_chalk10.default.green,
1641
+ "moderate-risk": import_chalk10.default.yellow,
1642
+ "high-risk": import_chalk10.default.red,
1643
+ "blind-risk": import_chalk10.default.bgRed.white
1644
+ };
1645
+ const safety = report.summary.aiChangeSafetyRating;
1646
+ const icon = safetyIcons[safety] ?? "\u2753";
1647
+ const color = safetyColors[safety] ?? import_chalk10.default.white;
1648
+ console.log(
1649
+ ` \u{1F9EA} Testability: ${import_chalk10.default.bold(scoring.score + "/100")} (${report.summary.rating})`
1650
+ );
1651
+ console.log(
1652
+ ` AI Change Safety: ${color(`${icon} ${safety.toUpperCase()}`)}`
1653
+ );
1654
+ console.log(
1655
+ import_chalk10.default.dim(
1656
+ ` Coverage: ${Math.round(report.summary.coverageRatio * 100)}% (${report.rawData.testFiles} test / ${report.rawData.sourceFiles} source files)`
1657
+ )
1658
+ );
1659
+ if (safety === "blind-risk") {
1660
+ console.log(
1661
+ import_chalk10.default.red.bold(
1662
+ "\n \u26A0\uFE0F NO TESTS \u2014 AI changes to this codebase are completely unverifiable!\n"
1663
+ )
1664
+ );
1665
+ }
1666
+ return scoring;
1667
+ }
1588
1668
 
1589
1669
  // src/commands/change-amplification.ts
1590
1670
  var import_cli = require("@aiready/change-amplification/dist/cli.js");
1591
1671
 
1672
+ // src/commands/clawmart.ts
1673
+ var import_chalk11 = __toESM(require("chalk"));
1674
+ var import_fs6 = __toESM(require("fs"));
1675
+ var import_path8 = require("path");
1676
+ var import_clawmart = require("@aiready/clawmart");
1677
+ function getClient(options) {
1678
+ const apiKey = options.apiKey || process.env.CLAWMART_API_KEY;
1679
+ if (!apiKey) {
1680
+ console.error(import_chalk11.default.red("\u274C ClawMart API Key is required."));
1681
+ console.log(
1682
+ import_chalk11.default.dim(
1683
+ " Set CLAWMART_API_KEY environment variable or use --api-key flag."
1684
+ )
1685
+ );
1686
+ process.exit(1);
1687
+ }
1688
+ return new import_clawmart.ClawMartClient(apiKey, options.server);
1689
+ }
1690
+ async function clawmartMeAction(options) {
1691
+ const client = getClient(options);
1692
+ try {
1693
+ const me = await client.getMe();
1694
+ console.log(import_chalk11.default.blue("\n\u{1F464} ClawMart Profile:"));
1695
+ console.log(` Name: ${import_chalk11.default.bold(me.name)}`);
1696
+ console.log(` Email: ${me.email}`);
1697
+ console.log(` Role: ${me.isCreator ? "Creator" : "User"}`);
1698
+ console.log(
1699
+ ` Sub: ${me.subscriptionActive ? import_chalk11.default.green("Active") : import_chalk11.default.red("Inactive")}`
1700
+ );
1701
+ } catch (error) {
1702
+ console.error(import_chalk11.default.red(`\u274C Failed to fetch profile: ${error.message}`));
1703
+ }
1704
+ }
1705
+ async function clawmartListingsAction(options) {
1706
+ const client = getClient(options);
1707
+ try {
1708
+ let listings;
1709
+ if (options.query) {
1710
+ listings = await client.searchListings(
1711
+ options.query,
1712
+ options.type,
1713
+ options.limit
1714
+ );
1715
+ } else {
1716
+ listings = await client.getListings();
1717
+ }
1718
+ if (listings.length === 0) {
1719
+ console.log(import_chalk11.default.yellow("\n\u{1F4ED} No listings found."));
1720
+ return;
1721
+ }
1722
+ console.log(import_chalk11.default.blue(`
1723
+ \u{1F3E0} ClawMart Listings (${listings.length}):`));
1724
+ listings.forEach((l) => {
1725
+ const status = l.published ? import_chalk11.default.green("Published") : import_chalk11.default.yellow("Draft");
1726
+ console.log(` - ${import_chalk11.default.bold(l.name)} (${import_chalk11.default.dim(l.id)})`);
1727
+ console.log(` ${import_chalk11.default.italic(l.tagline)}`);
1728
+ console.log(
1729
+ ` Price: $${l.price} | Type: ${l.productType} | Status: ${status}`
1730
+ );
1731
+ console.log("");
1732
+ });
1733
+ } catch (error) {
1734
+ console.error(import_chalk11.default.red(`\u274C Failed to fetch listings: ${error.message}`));
1735
+ }
1736
+ }
1737
+ async function clawmartCreateAction(options) {
1738
+ const client = getClient(options);
1739
+ try {
1740
+ const data = {
1741
+ name: options.name,
1742
+ tagline: options.tagline,
1743
+ about: options.about || "",
1744
+ category: options.category || "Utility",
1745
+ capabilities: options.capabilities ? options.capabilities.split(",") : [],
1746
+ price: parseFloat(options.price) || 0,
1747
+ productType: options.type
1748
+ };
1749
+ const listing = await client.createListing(data);
1750
+ console.log(import_chalk11.default.green(`
1751
+ \u2705 Listing created successfully!`));
1752
+ console.log(` ID: ${listing.id}`);
1753
+ console.log(` Name: ${listing.name}`);
1754
+ } catch (error) {
1755
+ console.error(import_chalk11.default.red(`\u274C Failed to create listing: ${error.message}`));
1756
+ }
1757
+ }
1758
+ async function clawmartUploadAction(id, files, options) {
1759
+ const client = getClient(options);
1760
+ try {
1761
+ const fileData = files.map((f) => {
1762
+ const path = (0, import_path8.resolve)(process.cwd(), f);
1763
+ if (!import_fs6.default.existsSync(path)) {
1764
+ throw new Error(`File not found: ${f}`);
1765
+ }
1766
+ return {
1767
+ path: f,
1768
+ content: import_fs6.default.readFileSync(path, "utf-8")
1769
+ };
1770
+ });
1771
+ await client.uploadVersion(id, fileData);
1772
+ console.log(
1773
+ import_chalk11.default.green(`
1774
+ \u2705 New version uploaded successfully to listing ${id}!`)
1775
+ );
1776
+ } catch (error) {
1777
+ console.error(import_chalk11.default.red(`\u274C Failed to upload version: ${error.message}`));
1778
+ }
1779
+ }
1780
+ async function clawmartDownloadAction(idOrSlug, options) {
1781
+ const client = getClient(options);
1782
+ try {
1783
+ const pkg = await client.downloadPackage(idOrSlug);
1784
+ const outDir = options.outDir || `./clawmart-${pkg.slug}`;
1785
+ if (!import_fs6.default.existsSync(outDir)) {
1786
+ import_fs6.default.mkdirSync(outDir, { recursive: true });
1787
+ }
1788
+ pkg.files.forEach((f) => {
1789
+ const filePath = (0, import_path8.resolve)(outDir, f.path);
1790
+ const dir = (0, import_path8.resolve)(filePath, "..");
1791
+ if (!import_fs6.default.existsSync(dir)) {
1792
+ import_fs6.default.mkdirSync(dir, { recursive: true });
1793
+ }
1794
+ import_fs6.default.writeFileSync(filePath, f.content);
1795
+ });
1796
+ console.log(
1797
+ import_chalk11.default.green(`
1798
+ \u2705 Package ${idOrSlug} downloaded to ${outDir}`)
1799
+ );
1800
+ } catch (error) {
1801
+ console.error(import_chalk11.default.red(`\u274C Failed to download package: ${error.message}`));
1802
+ }
1803
+ }
1804
+ var clawmartHelpText = `
1805
+ EXAMPLES:
1806
+ $ aiready clawmart me
1807
+ $ aiready clawmart listings --query "marketing"
1808
+ $ aiready clawmart create --name "SEO Booster" --tagline "Boost your SEO" --type skill --price 10
1809
+ $ aiready clawmart upload <listing-id> SKILL.md rules/
1810
+ $ aiready clawmart download <listing-id-or-slug> --outDir ./my-skill
1811
+
1812
+ ENVIRONMENT VARIABLES:
1813
+ CLAWMART_API_KEY Your ClawMart creator API key
1814
+ `;
1815
+
1592
1816
  // src/cli.ts
1593
1817
  var import_meta = {};
1594
1818
  var getDirname = () => {
1595
1819
  if (typeof __dirname !== "undefined") return __dirname;
1596
- return (0, import_path8.dirname)((0, import_url.fileURLToPath)(import_meta.url));
1820
+ return (0, import_path9.dirname)((0, import_url.fileURLToPath)(import_meta.url));
1597
1821
  };
1598
1822
  var packageJson = JSON.parse(
1599
- (0, import_fs6.readFileSync)((0, import_path8.join)(getDirname(), "../package.json"), "utf8")
1823
+ (0, import_fs7.readFileSync)((0, import_path9.join)(getDirname(), "../package.json"), "utf8")
1600
1824
  );
1601
1825
  var program = new import_commander.Command();
1602
1826
  program.name("aiready").description("AIReady - Assess and improve AI-readiness of codebases").version(packageJson.version).addHelpText(
@@ -1740,7 +1964,26 @@ program.command("visualize").description("Generate interactive visualization fro
1740
1964
  program.command("change-amplification").description("Analyze graph metrics for change amplification").argument("[directory]", "Directory to analyze", ".").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
1741
1965
  await (0, import_cli.changeAmplificationAction)(directory, options);
1742
1966
  });
1967
+ program.command("testability").description("Analyze test coverage and AI readiness").argument("[directory]", "Directory to analyze", ".").option("--min-coverage <ratio>", "Minimum acceptable coverage ratio", "0.3").option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").action(async (directory, options) => {
1968
+ await testabilityAction(directory, options);
1969
+ });
1743
1970
  program.command("upload").description("Upload an AIReady report JSON to the platform").argument("<file>", "Report JSON file to upload").option("--api-key <key>", "Platform API key").option("--repo-id <id>", "Platform repository ID (optional)").option("--server <url>", "Custom platform URL").addHelpText("after", uploadHelpText).action(async (file, options) => {
1744
1971
  await uploadAction(file, options);
1745
1972
  });
1973
+ var clawmart = program.command("clawmart").description("Manage ClawMart personas and skills").addHelpText("after", clawmartHelpText);
1974
+ clawmart.command("me").description("Show my ClawMart creator profile").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
1975
+ await clawmartMeAction(options);
1976
+ });
1977
+ clawmart.command("listings").description("Show my ClawMart listings").option("-q, --query <string>", "Search query").option("-t, --type <type>", "Filter by type: skill, persona").option("-l, --limit <number>", "Limit results", "10").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
1978
+ await clawmartListingsAction(options);
1979
+ });
1980
+ clawmart.command("create").description("Create a new listing on ClawMart").requiredOption("--name <string>", "Listing name").requiredOption("--tagline <string>", "Short tagline").option("--about <string>", "Full description").option("--category <string>", "Category", "Utility").option("--capabilities <string>", "Comma-separated list of capabilities").option("--price <number>", "Price in USD", "0").option("--type <type>", "Product type: skill, persona", "skill").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
1981
+ await clawmartCreateAction(options);
1982
+ });
1983
+ clawmart.command("upload").description("Upload content to a listing").argument("<id>", "Listing ID").argument("<files...>", "Files or directories to upload").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (id, files, options) => {
1984
+ await clawmartUploadAction(id, files, options);
1985
+ });
1986
+ clawmart.command("download").description("Download a package from ClawMart").argument("<idOrSlug>", "Listing ID or Slug").option("--outDir <path>", "Output directory").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (idOrSlug, options) => {
1987
+ await clawmartDownloadAction(idOrSlug, options);
1988
+ });
1746
1989
  program.parse();