ucn 3.4.6 → 3.4.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.
@@ -81,15 +81,15 @@ ucn deadcode --exclude=test # Skip test files (most useful)
81
81
 
82
82
  | Situation | Command | What it does |
83
83
  |-----------|---------|-------------|
84
- | Need function + all its helpers inline | `ucn smart <name>` | Returns function source with every helper it calls expanded below it |
84
+ | Need function + all its helpers inline | `ucn smart <name>` | Returns function source with every helper it calls expanded below it. Use instead of `about` when you need code, not metadata |
85
85
  | Checking if a refactor broke signatures | `ucn verify <name>` | Validates all call sites match the function's parameter count |
86
86
  | Understanding a file's role in the project | `ucn imports <file>` | What it depends on |
87
87
  | Understanding who depends on a file | `ucn exporters <file>` | Which files import it |
88
88
  | Quick project overview | `ucn toc` | Every file with function/class counts and line counts |
89
89
  | Finding all usages (not just calls) | `ucn usages <name>` | Groups into: definitions, calls, imports, type references |
90
- | Finding related code to refactor together | `ucn related <name>` | Functions sharing dependencies or in same file |
90
+ | Finding sibling/related functions | `ucn related <name>` | Name-based + structural matching (same file, shared deps). Not semantic — best for parse/format pairs |
91
91
  | Preview a rename or param change | `ucn plan <name> --rename-to=new_name` | Shows what would change without doing it |
92
- | Dependency tree for a file | `ucn graph <file> --depth=2` | Visual import tree |
92
+ | File-level dependency tree | `ucn graph <file> --depth=1` | Visual import tree. Can be noisy — use depth=1 for large/tightly-coupled projects. For function-level flow, use `trace` instead |
93
93
  | Find which tests cover a function | `ucn tests <name>` | Test files and test function names |
94
94
 
95
95
  ## Command Format
package/mcp/server.js CHANGED
@@ -807,7 +807,7 @@ server.registerTool(
807
807
  server.registerTool(
808
808
  'ucn_about',
809
809
  {
810
- description: 'Everything about a code symbol: definition, source code, callers, callees, tests. First stop when investigating any function or class. Works on JS/TS, Python, Go, Rust, Java.',
810
+ description: 'Everything about a symbol in one call: definition, source code, callers, callees, tests. START HERE when investigating any function or class — replaces 3-4 grep+read cycles. For narrower views, use ucn_context (callers/callees only), ucn_smart (code + dependencies), or ucn_impact (call sites for refactoring).',
811
811
  inputSchema: z.object({
812
812
  project_dir: projectDirParam,
813
813
  name: nameParam,
@@ -832,7 +832,7 @@ server.registerTool(
832
832
  server.registerTool(
833
833
  'ucn_context',
834
834
  {
835
- description: 'Quick view of who calls a function and what it calls. Shows callers and callees with file locations and call weights.',
835
+ description: 'Lightweight caller/callee list with numbered items. Use when you just need "who calls X and what does X call" without full source code. Items are numbered use ucn_expand to drill into any item. For the full picture (code + tests + everything), use ucn_about instead.',
836
836
  inputSchema: z.object({
837
837
  project_dir: projectDirParam,
838
838
  name: nameParam,
@@ -866,7 +866,7 @@ server.registerTool(
866
866
  server.registerTool(
867
867
  'ucn_impact',
868
868
  {
869
- description: 'Before changing a function, see every call site grouped by file. Shows arguments used at each call site. Essential for signature changes.',
869
+ description: 'Every call site of a function, grouped by file, with the actual arguments used at each site. Use BEFORE changing a function signature — shows exactly what will break. For a lighter caller list without arguments, use ucn_context.',
870
870
  inputSchema: z.object({
871
871
  project_dir: projectDirParam,
872
872
  name: nameParam,
@@ -890,7 +890,7 @@ server.registerTool(
890
890
  server.registerTool(
891
891
  'ucn_smart',
892
892
  {
893
- description: 'Function source code with all its dependencies expanded inline. Everything you need to understand or modify a function in one response.',
893
+ description: 'Function source code with all its dependencies expanded inline. Use when you need to read or modify a function and want its helpers included — saves multiple file reads. For call relationships without source code, use ucn_context.',
894
894
  inputSchema: z.object({
895
895
  project_dir: projectDirParam,
896
896
  name: nameParam,
@@ -922,7 +922,7 @@ server.registerTool(
922
922
  server.registerTool(
923
923
  'ucn_trace',
924
924
  {
925
- description: 'Call tree visualization showing execution flow. Traces what a function calls, what those call, etc. Depth-limited.',
925
+ description: 'Call tree visualization showing execution flow from a function downward. Maps architecture — shows which modules a pipeline touches. For file-level dependency trees, use ucn_graph instead.',
926
926
  inputSchema: z.object({
927
927
  project_dir: projectDirParam,
928
928
  name: nameParam,
@@ -1180,7 +1180,7 @@ server.registerTool(
1180
1180
  server.registerTool(
1181
1181
  'ucn_related',
1182
1182
  {
1183
- description: 'Find functions related to a symbol: same file, similar names, shared callers/callees. Useful for discovering associated code.',
1183
+ description: 'Find structurally related functions: same file, similar names, shared callers/callees. Results are name-based and structural, not semantic — best for finding sibling functions (e.g. parse/format pairs) rather than conceptually related code.',
1184
1184
  inputSchema: z.object({
1185
1185
  project_dir: projectDirParam,
1186
1186
  name: nameParam,
@@ -1204,7 +1204,7 @@ server.registerTool(
1204
1204
  server.registerTool(
1205
1205
  'ucn_graph',
1206
1206
  {
1207
- description: 'Dependency graph for a file. Shows import/export tree as a visual hierarchy.',
1207
+ description: 'File-level dependency graph showing import/export relationships between files. Best for understanding module structure. Can be noisy in tightly-coupled projects — use depth=1 for large codebases. For function-level execution flow, use ucn_trace instead.',
1208
1208
  inputSchema: z.object({
1209
1209
  project_dir: projectDirParam,
1210
1210
  file: z.string().describe('File path (relative to project root or absolute) to graph dependencies for'),
@@ -1490,7 +1490,7 @@ server.registerTool(
1490
1490
  server.registerTool(
1491
1491
  'ucn_api',
1492
1492
  {
1493
- description: 'Show exported/public symbols in the project or a specific file. Lists the public API surface.',
1493
+ description: 'Show exported/public symbols in the project. Works best with JS/TS (export keyword), Go (capitalized names), Rust (pub), Java (public). For Python, requires __all__ — projects without it will return empty results. Use ucn_toc for a general overview instead.',
1494
1494
  inputSchema: z.object({
1495
1495
  project_dir: projectDirParam,
1496
1496
  file: z.string().optional().describe('Optional file path to show exports for (relative to project root)')
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "ucn",
3
- "version": "3.4.6",
3
+ "version": "3.4.7",
4
4
  "description": "Code navigation built by AI, for AI. Reduces context usage when working with large codebases.",
5
5
  "main": "index.js",
6
6
  "bin": {
7
- "ucn": "./cli/index.js",
8
- "ucn-mcp": "./mcp/server.js"
7
+ "ucn": "cli/index.js",
8
+ "ucn-mcp": "mcp/server.js"
9
9
  },
10
10
  "scripts": {
11
11
  "test": "node --test test/parser.test.js"