ucn 3.7.2 → 3.7.3
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/README.md +21 -41
- package/package.json +18 -6
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UCN - Universal Code Navigator
|
|
2
2
|
|
|
3
|
-
UCN
|
|
3
|
+
UCN gives AI agents call-graph-level understanding of code. Instead of reading entire files, agents ask structural questions like: "who calls this function", "what breaks if I change it", "what's unused", and get precise, AST-verified answers. UCN parses JS/TS, Python, Go, Rust, Java, and HTML inline scripts with tree-sitter, then exposes 28 navigation commands as a CLI tool, MCP server, or agent skill.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Designed for large codebases where agents waste context on reading large files. UCN's surgical output means agents spend tokens on reasoning, not on ingesting thousands of lines to find three callers, discourages agents from cutting corners, as without UCN, agents working with large codebases tend to skip parts of the code structure, assuming they have "enough data".
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## Three Ways to
|
|
9
|
+
## Three Ways to it: ucn mcp, ucn skill, ucn cli
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
┌──────────────────────────────────────────────────────────────────────┐
|
|
@@ -25,9 +25,9 @@ Supported languages: JS/TS, Python, Go, Rust, Java. Also parses HTML files (inli
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## How agents understand code today
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
AI agents working with code typically do this:
|
|
31
31
|
|
|
32
32
|
```
|
|
33
33
|
grep "functionName" → 47 matches, 23 files
|
|
@@ -53,28 +53,7 @@ Typically, AI agents working with code do something like this:
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
UCN parses the code with tree-sitter and offers semantic navigation tools.
|
|
59
|
-
|
|
60
|
-
Instead of reading entire files, ask precise questions:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
┌──────────────────────────────────────┐
|
|
64
|
-
│ │
|
|
65
|
-
│ "Who calls this function?" │──→ list of actual callers
|
|
66
|
-
│ │
|
|
67
|
-
│ "What breaks if I change this?" │──→ every call site, with arguments
|
|
68
|
-
│ │
|
|
69
|
-
│ "Show me this function and │──→ source + dependencies inline
|
|
70
|
-
│ everything it depends on" │
|
|
71
|
-
│ │
|
|
72
|
-
└──────────────────────────────────────┘
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## How It Works
|
|
56
|
+
## How UCN works: tree-sitter, locally
|
|
78
57
|
|
|
79
58
|
```
|
|
80
59
|
┌──────────────────────────────────────────────┐
|
|
@@ -93,17 +72,17 @@ Instead of reading entire files, ask precise questions:
|
|
|
93
72
|
│
|
|
94
73
|
tree-sitter AST
|
|
95
74
|
│
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
75
|
+
┌─────────────────┴───────────────────┐
|
|
76
|
+
│ Supported Languages │
|
|
77
|
+
│ JS/TS, Python, Go, Rust, Java, HTML │
|
|
78
|
+
└─────────────────────────────────────┘
|
|
100
79
|
```
|
|
101
80
|
|
|
102
81
|
No cloud. No API keys. Parses locally, stays local.
|
|
103
82
|
|
|
104
83
|
---
|
|
105
84
|
|
|
106
|
-
## Before
|
|
85
|
+
## Before and after UCN
|
|
107
86
|
|
|
108
87
|
```
|
|
109
88
|
WITHOUT UCN WITH UCN
|
|
@@ -141,7 +120,7 @@ No cloud. No API keys. Parses locally, stays local.
|
|
|
141
120
|
Context spent on file contents Context spent on reasoning
|
|
142
121
|
```
|
|
143
122
|
|
|
144
|
-
After editing code:
|
|
123
|
+
After editing code, before committing:
|
|
145
124
|
|
|
146
125
|
```
|
|
147
126
|
WITHOUT UCN WITH UCN
|
|
@@ -170,7 +149,7 @@ After editing code:
|
|
|
170
149
|
|
|
171
150
|
---
|
|
172
151
|
|
|
173
|
-
##
|
|
152
|
+
## Text search vs AST
|
|
174
153
|
|
|
175
154
|
```
|
|
176
155
|
Code: processOrder(items, user)
|
|
@@ -206,11 +185,11 @@ After editing code:
|
|
|
206
185
|
└─────────────────────────────────────────────────────────────────┘
|
|
207
186
|
```
|
|
208
187
|
|
|
209
|
-
The tradeoff:
|
|
188
|
+
The tradeoff: text search works on any language and any text. UCN only works on 5 languages + HTML, but gives structural understanding within those.
|
|
210
189
|
|
|
211
190
|
---
|
|
212
191
|
|
|
213
|
-
##
|
|
192
|
+
## UCN commands in action
|
|
214
193
|
|
|
215
194
|
Extract a function from a large file without reading it:
|
|
216
195
|
|
|
@@ -461,7 +440,7 @@ ucn --interactive # Multiple queries, index stays in memory
|
|
|
461
440
|
|
|
462
441
|
---
|
|
463
442
|
|
|
464
|
-
##
|
|
443
|
+
## UCN workflows
|
|
465
444
|
|
|
466
445
|
Investigating a bug:
|
|
467
446
|
```bash
|
|
@@ -492,7 +471,7 @@ ucn toc # Project overview
|
|
|
492
471
|
|
|
493
472
|
---
|
|
494
473
|
|
|
495
|
-
## Limitations
|
|
474
|
+
## Limitations
|
|
496
475
|
|
|
497
476
|
```
|
|
498
477
|
┌──────────────────────────┬──────────────────────────────────────────┐
|
|
@@ -500,8 +479,9 @@ ucn toc # Project overview
|
|
|
500
479
|
├──────────────────────────┼──────────────────────────────────────────┤
|
|
501
480
|
│ │ │
|
|
502
481
|
│ 5 languages + HTML │ JS/TS, Python, Go, Rust, Java. │
|
|
503
|
-
│ (no C, Ruby, PHP, etc.) │ Agents fall back to
|
|
504
|
-
│ │ UCN complements, doesn't
|
|
482
|
+
│ (no C, Ruby, PHP, etc.) │ Agents fall back to text search for │
|
|
483
|
+
│ │ the rest. UCN complements, doesn't │
|
|
484
|
+
│ │ replace. │
|
|
505
485
|
│ │ │
|
|
506
486
|
├──────────────────────────┼──────────────────────────────────────────┤
|
|
507
487
|
│ │ │
|
|
@@ -535,7 +515,7 @@ ucn toc # Project overview
|
|
|
535
515
|
|
|
536
516
|
---
|
|
537
517
|
|
|
538
|
-
## All 28
|
|
518
|
+
## All 28 UCN tools
|
|
539
519
|
|
|
540
520
|
```
|
|
541
521
|
UNDERSTAND MODIFY SAFELY
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ucn",
|
|
3
|
-
"version": "3.7.
|
|
4
|
-
"description": "Universal Code Navigator —
|
|
3
|
+
"version": "3.7.3",
|
|
4
|
+
"description": "Universal Code Navigator — AST-based call graph analysis for AI agents. Find callers, trace impact, detect dead code across JS/TS, Python, Go, Rust, Java, and HTML. CLI, MCP server, and agent skill.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ucn": "cli/index.js",
|
|
@@ -11,19 +11,31 @@
|
|
|
11
11
|
"test": "node --test test/parser.test.js test/accuracy.test.js test/systematic-test.js test/mcp-edge-cases.js"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
|
+
"mcp",
|
|
15
|
+
"mcp-server",
|
|
16
|
+
"model-context-protocol",
|
|
14
17
|
"code-navigation",
|
|
18
|
+
"code-analysis",
|
|
19
|
+
"static-analysis",
|
|
20
|
+
"call-graph",
|
|
21
|
+
"callers",
|
|
22
|
+
"impact-analysis",
|
|
23
|
+
"dead-code",
|
|
24
|
+
"deadcode",
|
|
15
25
|
"ast",
|
|
16
|
-
"parser",
|
|
17
26
|
"tree-sitter",
|
|
27
|
+
"parser",
|
|
28
|
+
"skill",
|
|
29
|
+
"agent-skill",
|
|
30
|
+
"cli",
|
|
31
|
+
"ai-agent",
|
|
18
32
|
"javascript",
|
|
19
33
|
"typescript",
|
|
20
34
|
"python",
|
|
21
35
|
"go",
|
|
22
36
|
"rust",
|
|
23
37
|
"java",
|
|
24
|
-
"html"
|
|
25
|
-
"ai",
|
|
26
|
-
"agent"
|
|
38
|
+
"html"
|
|
27
39
|
],
|
|
28
40
|
"author": "Constantin-Mihail Leoca (https://github.com/mleoca)",
|
|
29
41
|
"repository": {
|