@aiready/context-analyzer 0.7.4 → 0.7.6

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.4 build /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.7.6 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
- CJS dist/index.js 33.35 KB
13
- CJS dist/cli.js 49.38 KB
14
- CJS ⚡️ Build success in 70ms
15
- ESM dist/index.mjs 504.00 B
16
12
  ESM dist/cli.mjs 18.45 KB
17
13
  ESM dist/chunk-DMRZMS2U.mjs 31.83 KB
18
- ESM ⚡️ Build success in 70ms
14
+ ESM dist/index.mjs 504.00 B
15
+ ESM ⚡️ Build success in 52ms
16
+ CJS dist/cli.js 49.38 KB
17
+ CJS dist/index.js 33.35 KB
18
+ CJS ⚡️ Build success in 52ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 598ms
20
+ DTS ⚡️ Build success in 595ms
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,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/context-analyzer@0.7.4 test /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.7.6 test /Users/pengcao/projects/aiready/packages/context-analyzer
4
4
  > vitest run
5
5
 
6
6
 
@@ -15,7 +15,7 @@
15
15
 
16
16
   Test Files  3 passed (3)
17
17
   Tests  28 passed (28)
18
-  Start at  17:33:01
19
-  Duration  540ms (transform 201ms, setup 0ms, collect 806ms, tests 29ms, environment 0ms, prepare 146ms)
18
+  Start at  01:48:25
19
+  Duration  507ms (transform 200ms, setup 0ms, collect 773ms, tests 28ms, environment 0ms, prepare 162ms)
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 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
15
33
  ```
16
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)
47
+ ```
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/context-analyzer",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
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.3"
53
+ "@aiready/core": "0.7.4"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "^22.10.2",