Skip to content

glue-tools-ai/onboarding-complexity-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@glue-tools-ai/onboarding-complexity

npm version npm downloads License: MIT

Estimate developer onboarding time from repository structure analysis. Analyzes language diversity, architecture complexity, documentation gaps, and knowledge concentration to predict time-to-productivity.

Installation

npm install -g @glue-tools-ai/onboarding-complexity

Or run directly with npx:

npx @glue-tools-ai/onboarding-complexity analyze /path/to/repo

Usage

Analyze a Repository

onboarding-complexity analyze /path/to/repo

Output example:

Analyzing repository structure...

Onboarding Complexity Report

Language Diversity:     7/10
Architecture Complexity: 6/10
Documentation Gap:      4/10
Dependency Complexity:  5/10
Knowledge Concentration: 8/10
Codebase Size:         5/10

Overall Score: 6.2/10

Estimated Onboarding Time (Mid-level Developer):
  6.2 weeks to productivity

For Junior Developers:
  10.85 weeks (1.75x multiplier)

For Senior Developers:
  3.1 weeks (0.5x multiplier)

Compare Two Repositories

onboarding-complexity compare /path/to/repo1 /path/to/repo2

Options

  • --format [format] - Output format: table, json, or markdown (default: table)
  • --experience [level] - Developer experience level: junior, mid, or senior (default: mid)

Examples

# Analyze with JSON output
onboarding-complexity analyze . --format json

# Compare with markdown output
onboarding-complexity compare repo1 repo2 --format markdown

# Analyze for a junior developer
onboarding-complexity analyze . --experience junior

How It Works

The complexity estimator analyzes six key dimensions:

  1. Language Diversity: Counts distinct programming languages and calculates primary vs. secondary language ratio
  2. Architecture Complexity: Measures directory depth, number of services/modules, and configuration complexity
  3. Documentation Gap: Evaluates README quality, code comment ratio, and API documentation presence
  4. Dependency Complexity: Counts total dependencies and framework variety
  5. Knowledge Concentration: Calculates bus factor from git history and identifies knowledge silos
  6. Codebase Size: Estimates total files and lines of code

Each dimension scores 0-10, then a weighted aggregate produces a final complexity score. The score is converted to estimated weeks using multipliers based on developer experience:

  • Junior Developer: 1.75x multiplier
  • Mid-level Developer: 1.0x multiplier (baseline)
  • Senior Developer: 0.5x multiplier

API Usage

import { analyzeRepository } from '@glue-tools-ai/onboarding-complexity';

const result = await analyzeRepository('/path/to/repo', {
  experience: 'mid'
});

console.log(result);
// {
//   scores: {
//     languageDiversity: 7,
//     architectureComplexity: 6,
//     documentationGap: 4,
//     dependencyComplexity: 5,
//     knowledgeConcentration: 8,
//     codebabseSize: 5
//   },
//   overall: 6.2,
//   weeks: 6.2,
//   ...
// }

Attribution

Created by Glue — Developer experience platform for engineering teams.

License

MIT - Copyright 2026 Glue

About

Node.js CLI: Estimate developer onboarding time from repository structure

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors