@aiready/context-analyzer 0.7.5 → 0.7.7

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.5 build /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.7.7 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/chunk-DMRZMS2U.mjs 31.83 KB
12
+ CJS dist/index.js 33.35 KB
13
+ CJS dist/cli.js 49.38 KB
14
+ CJS ⚡️ Build success in 54ms
13
15
  ESM dist/index.mjs 504.00 B
14
16
  ESM dist/cli.mjs 18.45 KB
15
- ESM ⚡️ Build success in 15ms
16
- CJS dist/cli.js 49.38 KB
17
- CJS dist/index.js 33.35 KB
18
- CJS ⚡️ Build success in 15ms
17
+ ESM dist/chunk-DMRZMS2U.mjs 31.83 KB
18
+ ESM ⚡️ Build success in 54ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 541ms
20
+ DTS ⚡️ Build success in 574ms
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,12 @@
1
1
 
2
2
  
3
- > @aiready/context-analyzer@0.7.5 test /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.7.7 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__/analyzer.test.ts (14)
10
10
  ✓ src/__tests__/auto-detection.test.ts (8)
11
11
  ✓ src/__tests__/enhanced-cohesion.test.ts (6)
12
12
   ✓ src/__tests__/analyzer.test.ts (14)
@@ -15,7 +15,7 @@
15
15
 
16
16
   Test Files  3 passed (3)
17
17
   Tests  28 passed (28)
18
-  Start at  01:15:53
19
-  Duration  566ms (transform 197ms, setup 0ms, collect 778ms, tests 28ms, environment 0ms, prepare 134ms)
18
+  Start at  18:32:40
19
+  Duration  542ms (transform 233ms, setup 0ms, collect 831ms, tests 28ms, environment 0ms, prepare 140ms)
20
20
 
21
21
  [?25h[?25h
package/README.md CHANGED
@@ -9,11 +9,53 @@ When AI tools try to help with your code, they need to load files into their con
9
9
  - 🎯 **Low Cohesion**: Files mixing unrelated concerns (God objects)
10
10
  - 🗂️ **High Fragmentation**: Domains scattered across many directories
11
11
 
12
- **Quick Start:**
12
+ ## 🚀 Quick Start
13
+
14
+ **Zero config, works out of the box:**
15
+
13
16
  ```bash
17
+ # Run without installation (recommended)
14
18
  npx @aiready/context-analyzer ./src
19
+
20
+ # Or use the unified CLI (includes all AIReady tools)
21
+ npx @aiready/cli scan ./src
22
+
23
+ # Or install globally for simpler command and faster runs
24
+ npm install -g @aiready/context-analyzer
25
+ aiready-context ./src
26
+ ```
27
+
28
+ ### 🎯 Input & Output
29
+
30
+ **Input:** Path to your source code directory
31
+ ```bash
32
+ aiready-context ./src
33
+ ```
34
+
35
+ **Output:** Terminal report + optional JSON file (saved to `.aiready/` directory)
36
+ ```
37
+ 📊 Context Analysis Results
38
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
39
+ 📁 Files analyzed: 47
40
+ ⚠️ Issues found: 8 files with problems
41
+
42
+ CRITICAL (3 files)
43
+ src/services/user.ts
44
+ • Context budget: 15,234 tokens (HIGH)
45
+ • Import depth: 8 levels (DEEP)
46
+ • Cohesion: 0.23 (LOW)
15
47
  ```
16
48
 
49
+ ### ✨ Smart Defaults (Zero Config)
50
+
51
+ - ✅ **Auto-excludes** test files (`**/*.test.*`, `**/*.spec.*`, `**/__tests__/**`)
52
+ - ✅ **Auto-excludes** build outputs (`dist/`, `build/`, `.next/`, `cdk.out/`)
53
+ - ✅ **Auto-excludes** dependencies (`node_modules/`)
54
+ - ✅ **Auto-detects** frameworks (Next.js, AWS CDK) and adjusts analysis
55
+ - ✅ **Adaptive thresholds**: Adjusts issue detection based on project complexity
56
+
57
+ > Override defaults with `--include-tests` or `--exclude <patterns>` as needed
58
+
17
59
  ## 🎯 Why This Tool?
18
60
 
19
61
  ### The AI Context Cost Problem
@@ -773,6 +815,10 @@ MIT © AIReady Team
773
815
 
774
816
  ---
775
817
 
818
+ ## 🌐 Visit Our Website
819
+
820
+ **Try AIReady tools online and optimize your AI context:** [getaiready.dev](https://getaiready.dev)
821
+
776
822
  **Made with ❤️ for AI-assisted development**
777
823
 
778
824
  *Stop wasting context tokens on fragmented code.*
package/dist/cli.js CHANGED
@@ -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
@@ -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.5",
3
+ "version": "0.7.7",
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.5"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^22.10.2",
package/src/cli.ts CHANGED
@@ -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;