@aiready/context-analyzer 0.7.6 → 0.7.11

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/context-analyzer@0.7.6 build /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.7.11 build /Users/pengcao/projects/aiready/packages/context-analyzer
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -9,15 +9,15 @@
9
9
  CLI Target: es2020
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/cli.mjs 18.45 KB
13
- ESM dist/chunk-DMRZMS2U.mjs 31.83 KB
12
+ ESM dist/cli.mjs 18.50 KB
14
13
  ESM dist/index.mjs 504.00 B
15
- ESM ⚡️ Build success in 52ms
16
- CJS dist/cli.js 49.38 KB
14
+ ESM dist/chunk-DMRZMS2U.mjs 31.83 KB
15
+ ESM ⚡️ Build success in 230ms
17
16
  CJS dist/index.js 33.35 KB
18
- CJS ⚡️ Build success in 52ms
17
+ CJS dist/cli.js 49.43 KB
18
+ CJS ⚡️ Build success in 230ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 595ms
20
+ DTS ⚡️ Build success in 1766ms
21
21
  DTS dist/cli.d.ts 20.00 B
22
22
  DTS dist/index.d.ts 5.56 KB
23
23
  DTS dist/cli.d.mts 20.00 B
@@ -1,12 +1,21 @@
1
1
 
2
2
  
3
- > @aiready/context-analyzer@0.7.6 test /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.7.11 test /Users/pengcao/projects/aiready/packages/context-analyzer
4
4
  > vitest run
5
5
 
6
6
 
7
7
   RUN  v2.1.9 /Users/pengcao/projects/aiready/packages/context-analyzer
8
8
 
9
- [?25l · src/__tests__/analyzer.test.ts (14)
9
+ [?25l · src/__tests__/auto-detection.test.ts (8)
10
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l · src/__tests__/analyzer.test.ts (14)
11
+ ✓ src/__tests__/auto-detection.test.ts (8)
12
+ [?25l[?25l[?25l[?25l · src/__tests__/analyzer.test.ts (14)
13
+ ✓ src/__tests__/auto-detection.test.ts (8)
14
+ · src/__tests__/enhanced-cohesion.test.ts (6)
15
+ [?25l · src/__tests__/analyzer.test.ts (14)
16
+ ✓ src/__tests__/auto-detection.test.ts (8)
17
+ ✓ src/__tests__/enhanced-cohesion.test.ts (6)
18
+ [?25l[?25l ✓ src/__tests__/analyzer.test.ts (14)
10
19
  ✓ src/__tests__/auto-detection.test.ts (8)
11
20
  ✓ src/__tests__/enhanced-cohesion.test.ts (6)
12
21
   ✓ src/__tests__/analyzer.test.ts (14)
@@ -15,7 +24,7 @@
15
24
 
16
25
   Test Files  3 passed (3)
17
26
   Tests  28 passed (28)
18
-  Start at  01:48:25
19
-  Duration  507ms (transform 200ms, setup 0ms, collect 773ms, tests 28ms, environment 0ms, prepare 162ms)
27
+  Start at  19:03:23
28
+  Duration  2.35s (transform 487ms, setup 0ms, collect 2.60s, tests 302ms, environment 0ms, prepare 856ms)
20
29
 
21
30
  [?25h[?25h
package/README.md CHANGED
@@ -20,7 +20,7 @@ npx @aiready/context-analyzer ./src
20
20
  # Or use the unified CLI (includes all AIReady tools)
21
21
  npx @aiready/cli scan ./src
22
22
 
23
- # Or install globally for faster runs
23
+ # Or install globally for simpler command and faster runs
24
24
  npm install -g @aiready/context-analyzer
25
25
  aiready-context ./src
26
26
  ```
@@ -815,6 +815,10 @@ MIT © AIReady Team
815
815
 
816
816
  ---
817
817
 
818
+ ## 🌐 Visit Our Website
819
+
820
+ **Try AIReady tools online and optimize your AI context:** [getaiready.dev](https://getaiready.dev)
821
+
818
822
  **Made with ❤️ for AI-assisted development**
819
823
 
820
824
  *Stop wasting context tokens on fragmented code.*
package/dist/cli.js CHANGED
@@ -967,26 +967,26 @@ program.parse();
967
967
  function displayTuningGuidance(results, options) {
968
968
  const issueCount = results.filter((r) => r.severity !== "info").length;
969
969
  if (issueCount === 0) {
970
- console.log(import_chalk.default.green("\n\u2728 No issues found! Your code is well-structured for AI context usage.\n"));
970
+ console.log(import_chalk.default.green("\n\u2728 No optimization opportunities found! Your code is well-structured for AI context usage.\n"));
971
971
  return;
972
972
  }
973
973
  console.log(import_chalk.default.cyan("\n\u2501".repeat(60)));
974
974
  console.log(import_chalk.default.bold.white(" TUNING GUIDANCE"));
975
975
  console.log(import_chalk.default.cyan("\u2501".repeat(60) + "\n"));
976
976
  if (issueCount < 5) {
977
- console.log(import_chalk.default.yellow("\u{1F4CA} Showing few issues. To catch more potential problems:\n"));
977
+ console.log(import_chalk.default.yellow("\u{1F4CA} Showing few optimization opportunities. To find more areas to improve:\n"));
978
978
  console.log(import_chalk.default.dim(" \u2022 Lower --max-depth (currently: " + options.maxDepth + ") to catch shallower import chains"));
979
979
  console.log(import_chalk.default.dim(" \u2022 Lower --max-context (currently: " + options.maxContextBudget.toLocaleString() + ") to catch smaller files"));
980
980
  console.log(import_chalk.default.dim(" \u2022 Raise --min-cohesion (currently: " + (options.minCohesion * 100).toFixed(0) + "%) to be stricter about mixed concerns"));
981
981
  console.log(import_chalk.default.dim(" \u2022 Lower --max-fragmentation (currently: " + (options.maxFragmentation * 100).toFixed(0) + "%) to catch scattered code\n"));
982
982
  } else if (issueCount > 20) {
983
- console.log(import_chalk.default.yellow("\u{1F4CA} Showing many issues. To focus on most critical problems:\n"));
983
+ console.log(import_chalk.default.yellow("\u{1F4CA} Showing many opportunities. To focus on highest-impact areas:\n"));
984
984
  console.log(import_chalk.default.dim(" \u2022 Raise --max-depth (currently: " + options.maxDepth + ") to only catch very deep chains"));
985
985
  console.log(import_chalk.default.dim(" \u2022 Raise --max-context (currently: " + options.maxContextBudget.toLocaleString() + ") to focus on largest files"));
986
986
  console.log(import_chalk.default.dim(" \u2022 Lower --min-cohesion (currently: " + (options.minCohesion * 100).toFixed(0) + "%) to only flag severe mixed concerns"));
987
987
  console.log(import_chalk.default.dim(" \u2022 Raise --max-fragmentation (currently: " + (options.maxFragmentation * 100).toFixed(0) + "%) to only flag highly scattered code\n"));
988
988
  } else {
989
- console.log(import_chalk.default.green("\u{1F4CA} Good balance of issues detected (showing " + issueCount + " issues)\n"));
989
+ console.log(import_chalk.default.green("\u{1F4CA} Good balance of optimization opportunities (showing " + issueCount + " areas)\n"));
990
990
  console.log(import_chalk.default.dim(" \u{1F4A1} Tip: Adjust thresholds if needed:"));
991
991
  console.log(import_chalk.default.dim(" aiready-context . --max-depth N --max-context N --min-cohesion 0.X\n"));
992
992
  }
@@ -1117,7 +1117,7 @@ function displayConsoleReport(summary, results, elapsedTime, maxResults = 10) {
1117
1117
  console.log(import_chalk.default.cyan(divider));
1118
1118
  console.log(
1119
1119
  import_chalk.default.dim(
1120
- "\n\u2B50 Like AIReady? Star us on GitHub: https://github.com/caopengau/aiready-context-analyzer"
1120
+ "\n\u2B50 Like aiready? Star us on GitHub: https://github.com/caopengau/aiready-context-analyzer"
1121
1121
  )
1122
1122
  );
1123
1123
  console.log(
@@ -1131,7 +1131,7 @@ function generateHTMLReport(summary, results) {
1131
1131
  <head>
1132
1132
  <meta charset="UTF-8">
1133
1133
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1134
- <title>AIReady Context Analysis Report</title>
1134
+ <title>aiready Context Analysis Report</title>
1135
1135
  <style>
1136
1136
  body {
1137
1137
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
package/dist/cli.mjs CHANGED
@@ -99,26 +99,26 @@ program.parse();
99
99
  function displayTuningGuidance(results, options) {
100
100
  const issueCount = results.filter((r) => r.severity !== "info").length;
101
101
  if (issueCount === 0) {
102
- console.log(chalk.green("\n\u2728 No issues found! Your code is well-structured for AI context usage.\n"));
102
+ console.log(chalk.green("\n\u2728 No optimization opportunities found! Your code is well-structured for AI context usage.\n"));
103
103
  return;
104
104
  }
105
105
  console.log(chalk.cyan("\n\u2501".repeat(60)));
106
106
  console.log(chalk.bold.white(" TUNING GUIDANCE"));
107
107
  console.log(chalk.cyan("\u2501".repeat(60) + "\n"));
108
108
  if (issueCount < 5) {
109
- console.log(chalk.yellow("\u{1F4CA} Showing few issues. To catch more potential problems:\n"));
109
+ console.log(chalk.yellow("\u{1F4CA} Showing few optimization opportunities. To find more areas to improve:\n"));
110
110
  console.log(chalk.dim(" \u2022 Lower --max-depth (currently: " + options.maxDepth + ") to catch shallower import chains"));
111
111
  console.log(chalk.dim(" \u2022 Lower --max-context (currently: " + options.maxContextBudget.toLocaleString() + ") to catch smaller files"));
112
112
  console.log(chalk.dim(" \u2022 Raise --min-cohesion (currently: " + (options.minCohesion * 100).toFixed(0) + "%) to be stricter about mixed concerns"));
113
113
  console.log(chalk.dim(" \u2022 Lower --max-fragmentation (currently: " + (options.maxFragmentation * 100).toFixed(0) + "%) to catch scattered code\n"));
114
114
  } else if (issueCount > 20) {
115
- console.log(chalk.yellow("\u{1F4CA} Showing many issues. To focus on most critical problems:\n"));
115
+ console.log(chalk.yellow("\u{1F4CA} Showing many opportunities. To focus on highest-impact areas:\n"));
116
116
  console.log(chalk.dim(" \u2022 Raise --max-depth (currently: " + options.maxDepth + ") to only catch very deep chains"));
117
117
  console.log(chalk.dim(" \u2022 Raise --max-context (currently: " + options.maxContextBudget.toLocaleString() + ") to focus on largest files"));
118
118
  console.log(chalk.dim(" \u2022 Lower --min-cohesion (currently: " + (options.minCohesion * 100).toFixed(0) + "%) to only flag severe mixed concerns"));
119
119
  console.log(chalk.dim(" \u2022 Raise --max-fragmentation (currently: " + (options.maxFragmentation * 100).toFixed(0) + "%) to only flag highly scattered code\n"));
120
120
  } else {
121
- console.log(chalk.green("\u{1F4CA} Good balance of issues detected (showing " + issueCount + " issues)\n"));
121
+ console.log(chalk.green("\u{1F4CA} Good balance of optimization opportunities (showing " + issueCount + " areas)\n"));
122
122
  console.log(chalk.dim(" \u{1F4A1} Tip: Adjust thresholds if needed:"));
123
123
  console.log(chalk.dim(" aiready-context . --max-depth N --max-context N --min-cohesion 0.X\n"));
124
124
  }
@@ -249,7 +249,7 @@ function displayConsoleReport(summary, results, elapsedTime, maxResults = 10) {
249
249
  console.log(chalk.cyan(divider));
250
250
  console.log(
251
251
  chalk.dim(
252
- "\n\u2B50 Like AIReady? Star us on GitHub: https://github.com/caopengau/aiready-context-analyzer"
252
+ "\n\u2B50 Like aiready? Star us on GitHub: https://github.com/caopengau/aiready-context-analyzer"
253
253
  )
254
254
  );
255
255
  console.log(
@@ -263,7 +263,7 @@ function generateHTMLReport(summary, results) {
263
263
  <head>
264
264
  <meta charset="UTF-8">
265
265
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
266
- <title>AIReady Context Analysis Report</title>
266
+ <title>aiready Context Analysis Report</title>
267
267
  <style>
268
268
  body {
269
269
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/context-analyzer",
3
- "version": "0.7.6",
3
+ "version": "0.7.11",
4
4
  "description": "AI context window cost analysis - detect fragmented code, deep import chains, and expensive context budgets",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -50,7 +50,7 @@
50
50
  "commander": "^12.1.0",
51
51
  "chalk": "^5.3.0",
52
52
  "prompts": "^2.4.2",
53
- "@aiready/core": "0.7.4"
53
+ "@aiready/core": "0.7.7"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^22.10.2",
package/src/cli.ts CHANGED
@@ -141,7 +141,7 @@ function displayTuningGuidance(
141
141
  const issueCount = results.filter(r => r.severity !== 'info').length;
142
142
 
143
143
  if (issueCount === 0) {
144
- console.log(chalk.green('\n✨ No issues found! Your code is well-structured for AI context usage.\n'));
144
+ console.log(chalk.green('\n✨ No optimization opportunities found! Your code is well-structured for AI context usage.\n'));
145
145
  return;
146
146
  }
147
147
 
@@ -150,19 +150,19 @@ function displayTuningGuidance(
150
150
  console.log(chalk.cyan('━'.repeat(60) + '\n'));
151
151
 
152
152
  if (issueCount < 5) {
153
- console.log(chalk.yellow('📊 Showing few issues. To catch more potential problems:\n'));
153
+ console.log(chalk.yellow('📊 Showing few optimization opportunities. To find more areas to improve:\n'));
154
154
  console.log(chalk.dim(' • Lower --max-depth (currently: ' + options.maxDepth + ') to catch shallower import chains'));
155
155
  console.log(chalk.dim(' • Lower --max-context (currently: ' + options.maxContextBudget.toLocaleString() + ') to catch smaller files'));
156
156
  console.log(chalk.dim(' • Raise --min-cohesion (currently: ' + (options.minCohesion * 100).toFixed(0) + '%) to be stricter about mixed concerns'));
157
157
  console.log(chalk.dim(' • Lower --max-fragmentation (currently: ' + (options.maxFragmentation * 100).toFixed(0) + '%) to catch scattered code\n'));
158
158
  } else if (issueCount > 20) {
159
- console.log(chalk.yellow('📊 Showing many issues. To focus on most critical problems:\n'));
159
+ console.log(chalk.yellow('📊 Showing many opportunities. To focus on highest-impact areas:\n'));
160
160
  console.log(chalk.dim(' • Raise --max-depth (currently: ' + options.maxDepth + ') to only catch very deep chains'));
161
161
  console.log(chalk.dim(' • Raise --max-context (currently: ' + options.maxContextBudget.toLocaleString() + ') to focus on largest files'));
162
162
  console.log(chalk.dim(' • Lower --min-cohesion (currently: ' + (options.minCohesion * 100).toFixed(0) + '%) to only flag severe mixed concerns'));
163
163
  console.log(chalk.dim(' • Raise --max-fragmentation (currently: ' + (options.maxFragmentation * 100).toFixed(0) + '%) to only flag highly scattered code\n'));
164
164
  } else {
165
- console.log(chalk.green('📊 Good balance of issues detected (showing ' + issueCount + ' issues)\n'));
165
+ console.log(chalk.green('📊 Good balance of optimization opportunities (showing ' + issueCount + ' areas)\n'));
166
166
  console.log(chalk.dim(' 💡 Tip: Adjust thresholds if needed:'));
167
167
  console.log(chalk.dim(' aiready-context . --max-depth N --max-context N --min-cohesion 0.X\n'));
168
168
  }
@@ -329,7 +329,7 @@ function displayConsoleReport(
329
329
  console.log(chalk.cyan(divider));
330
330
  console.log(
331
331
  chalk.dim(
332
- '\n⭐ Like AIReady? Star us on GitHub: https://github.com/caopengau/aiready-context-analyzer'
332
+ '\n⭐ Like aiready? Star us on GitHub: https://github.com/caopengau/aiready-context-analyzer'
333
333
  )
334
334
  );
335
335
  console.log(
@@ -352,7 +352,7 @@ function generateHTMLReport(
352
352
  <head>
353
353
  <meta charset="UTF-8">
354
354
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
355
- <title>AIReady Context Analysis Report</title>
355
+ <title>aiready Context Analysis Report</title>
356
356
  <style>
357
357
  body {
358
358
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;