@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.
- package/.turbo/turbo-build.log +7 -7
- package/.turbo/turbo-test.log +3 -3
- package/README.md +43 -1
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/context-analyzer@0.7.
|
|
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
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[32m33.35 KB[39m
|
|
13
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m49.38 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in 70ms
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m504.00 B[39m
|
|
16
12
|
[32mESM[39m [1mdist/cli.mjs [22m[32m18.45 KB[39m
|
|
17
13
|
[32mESM[39m [1mdist/chunk-DMRZMS2U.mjs [22m[32m31.83 KB[39m
|
|
18
|
-
[32mESM[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m504.00 B[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 52ms
|
|
16
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m49.38 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js [22m[32m33.35 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 52ms
|
|
19
19
|
DTS Build start
|
|
20
|
-
DTS ⚡️ Build success in
|
|
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
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/context-analyzer@0.7.
|
|
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
|
[2m Test Files [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
17
17
|
[2m Tests [22m [1m[32m28 passed[39m[22m[90m (28)[39m
|
|
18
|
-
[2m Start at [22m
|
|
19
|
-
[2m Duration [22m
|
|
18
|
+
[2m Start at [22m 01:48:25
|
|
19
|
+
[2m Duration [22m 507ms[2m (transform 200ms, setup 0ms, collect 773ms, tests 28ms, environment 0ms, prepare 162ms)[22m
|
|
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
|
-
|
|
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.
|
|
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.
|
|
53
|
+
"@aiready/core": "0.7.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^22.10.2",
|