@heildamm/cli 0.1.0

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.
Files changed (4) hide show
  1. package/LICENSE +14 -0
  2. package/README.md +155 -0
  3. package/bin/run.js +2 -0
  4. package/package.json +61 -0
package/LICENSE ADDED
@@ -0,0 +1,14 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Heildamm
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software...
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14
+ EOF
package/README.md ADDED
@@ -0,0 +1,155 @@
1
+
2
+ <div align="center">
3
+ <pre style="color: #8e61c6; background: transparent; border: none; font-weight: bold; line-height: 1.2;">
4
+ ░▒▓▓▒░
5
+ ░▒▓▓▓▓░ ▒▓▓▓▒
6
+ ░▒▓▓▓▓░ ▒▓▓▓▓░
7
+ ░▒▓▓▓▓▓▒░ ▒▓▓▓▓░
8
+ ░▒▓▓▓▓▓▓▓▓▒▒▓▓▓▓░
9
+ ░▒▓▓▓▓▒▓▓▓▓▓▓▓▓▓░
10
+ ░▒▓▓▓▓ ░▓▓▓▓▓▓▓░
11
+ ░▒▓▓▓▓ ░▒▓▓▓▓░
12
+ ░▒▓▓▓▓░ ▒▓▓▓▓░
13
+ ░▒▓▓▓▓ ▒▓▓▓▓░
14
+ ░▓▓▓▓░ ▒▓▓▓▓░
15
+ ░░ ▒▓▒▒░
16
+ </pre>
17
+ </div>
18
+
19
+ # Heildamm
20
+
21
+ > **A local-first Git analysis engine.** Extract structural, temporal, and ownership insights from any repository without relying on external services or compromising data security.
22
+
23
+ Heildamm operates exclusively within the local `.git` directory. By applying deterministic algorithms, it reconstructs the evolutionary timeline of a codebase, transforming historical Git data into actionable engineering metrics.
24
+
25
+ ---
26
+
27
+ ## Table of Contents
28
+ 1. [Executive Overview](#executive-overview)
29
+ 2. [Core Principles](#core-principles)
30
+ 3. [Conceptual Model](#conceptual-model)
31
+ 4. [Architecture](#architecture)
32
+ 5. [Roadmap & Capabilities](#roadmap--capabilities)
33
+ 6. [Getting Started (Planned)](#getting-started-planned)
34
+ 7. [License](#license)
35
+
36
+ ---
37
+
38
+ ## Executive Overview
39
+
40
+ Modern codebases accumulate structural complexity through continuous modification, but the contextual reasoning behind these changes is frequently lost. Traditional version control interfaces provide fragmented visibility:
41
+
42
+ * **`git log`:** Outputs chronological sequences devoid of systemic context.
43
+ * **`git blame`:** Attributes line-level authorship without accounting for temporal relevance.
44
+ * **Code Review Platforms:** Isolate analysis to immediate, pending changes.
45
+
46
+ **Heildamm** bridges this visibility gap. It treats the repository's history as a comprehensive dataset, allowing engineering leadership and maintainers to model, analyze, and interpret the lifecycle of the codebase holistically.
47
+
48
+ ---
49
+
50
+ ## Core Principles
51
+
52
+ * **Local-First & Secure:** All analytical processing is executed locally. Zero network requests, no external APIs, and no source code exfiltration, ensuring strict compliance with internal security policies.
53
+ * **Deterministic Execution:** System outputs are exclusively derived from reproducible algorithms applied to raw Git data. The architecture deliberately avoids non-deterministic probabilistic models or opaque machine learning layers.
54
+ * **Structural History:** The commit timeline is parsed not as a flat log, but as a structured sequence of architectural transformations that can be queried and grouped.
55
+ * **Knowledge over Authorship:** Code ownership is dynamically calculated based on active contribution and recency, discarding the static and often outdated metric of original authorship.
56
+
57
+ ---
58
+
59
+ ## Conceptual Model
60
+
61
+ ### 1. Authorship and Knowledge Distribution
62
+ Heildamm calculates a **"living ownership"** matrix utilizing:
63
+ * Granular line-level attribution.
64
+ * Temporal decay algorithms (weighting recent modifications more heavily).
65
+ * Aggregate contribution metrics per file and subsystem.
66
+
67
+ **Business Value:** Identifies active knowledge domain experts, highlights stale code maintained by inactive personnel, and quantifies knowledge silos.
68
+
69
+ ### 2. Temporal Clustering (Evolution Arcs)
70
+ Individual commits are mathematically grouped into **"arcs"** based on:
71
+ * Chronological proximity.
72
+ * File intersection and cross-dependency across commits.
73
+
74
+ **Business Value:** Reconstructs the narrative of the project—such as the phased rollout of a feature, the execution of technical debt reduction, or major architectural pivots—abstracting the noise of atomic commits.
75
+
76
+ ### 3. Hotspot Detection
77
+ Systemic risk areas are flagged by evaluating:
78
+ * Modification frequency (commit velocity per file).
79
+ * Unique contributor volume.
80
+ * Codebase expansion rates over defined intervals.
81
+
82
+ **Business Value:** Statistically isolates files with a high probability of latent defects, pinpointing optimal candidates for targeted refactoring to prevent regressions.
83
+
84
+ ### 4. Bus Factor Estimation
85
+ For any given module or specific file, Heildamm computes:
86
+ * The raw count of engineers possessing critical operational knowledge.
87
+ * The mathematical dependency on specific individual contributors.
88
+
89
+ **Business Value:** Provides objective metrics on structural maintenance risks and aids in capacity planning and team onboarding strategies.
90
+
91
+ ---
92
+
93
+ ## Architecture
94
+
95
+ Heildamm is built on a highly modular, decoupled architecture, enabling robust performance and future extensibility:
96
+
97
+ ```text
98
+ Engine Core
99
+ ├── Git Parser # Extracts and normalizes raw .git object data
100
+ ├── Data Model # Constructs the in-memory representation of repository state
101
+ ├── Analyzer # Applies deterministic rulesets and clustering algorithms
102
+ └── Metrics Engine # Aggregates scores (hotspots, bus factor, ownership)
103
+ ```
104
+
105
+ **Planned Interface Layers:**
106
+ * **CLI Engine:** Built for continuous integration (CI/CD) pipelines and terminal usage.
107
+ * **Local Visualization Server:** Generates interactive, browser-based telemetry dashboards.
108
+ * **Narrative Generator:** Compiles automated, human-readable executive summaries of codebase health.
109
+
110
+ ---
111
+
112
+ ## Roadmap & Capabilities
113
+
114
+ The following features dictate the current development roadmap, all guaranteed to run in offline, air-gapped environments:
115
+
116
+ * **Deep Git Object Parsing:** Complete historical traversal without overhead.
117
+ * **Blame-Based Authorship Matrix:** High-fidelity contributor tracking.
118
+ * **Recency-Weighted Scoring System:** Intelligent degradation of historical authorship.
119
+ * **Commit Arc Clustering:** Feature-level timeline reconstruction.
120
+ * **Volatility Hotspot Scoring:** Predictive risk assessment based on churn.
121
+ * **Bus Factor Analytics:** Automated team dependency reporting.
122
+
123
+ ---
124
+
125
+ ## Getting Started (Planned)
126
+
127
+ ### Installation
128
+ *(Pending release - placeholder for binary/package manager instructions)*
129
+ ```bash
130
+ # Example: curl -sSL [https://heildamm.dev/install.sh](https://heildamm.dev/install.sh) | bash
131
+ ```
132
+
133
+ ### Usage Examples
134
+ Execute Heildamm at the root of your Git repository:
135
+
136
+ ```bash
137
+ # Initialize a full repository analysis
138
+ heildamm analyze .
139
+
140
+ # Output a targeted report of the top 10 most volatile files
141
+ heildamm report --type hotspots --limit 10
142
+
143
+ # Calculate the bus factor for a specific architectural boundary
144
+ heildamm bus-factor ./src/core/networking
145
+
146
+ # Generate a machine-readable JSON output for CI pipeline ingestion
147
+ heildamm analyze . --format json > report.json
148
+ ```
149
+
150
+ ---
151
+
152
+ ## License
153
+
154
+ Copyright © 2026. All rights reserved.
155
+ *(Update this section with your specific open-source or proprietary license).*
package/bin/run.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ console.log("Hello from heildamm CLI!");
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@heildamm/cli",
3
+ "version": "0.1.0",
4
+ "description": "A local-first Git analysis engine to extract structural, temporal, and ownership insights.",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "bin": {
8
+ "heildamm": "./bin/run.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "build:clean": "rm -rf dist && tsc",
13
+ "dev": "tsc --watch",
14
+ "start": "node ./bin/run.js",
15
+ "lint": "eslint 'src/**/*.{js,ts}' --quiet --fix",
16
+ "test": "jest --passWithNoTests",
17
+ "test:coverage": "jest --coverage",
18
+ "prepare": "npm run build"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/glatztp/heildamm"
23
+ },
24
+ "keywords": [
25
+ "git",
26
+ "analysis",
27
+ "telemetry",
28
+ "engineering-metrics",
29
+ "cli",
30
+ "local-first"
31
+ ],
32
+ "author": "Gabriel Glatz ",
33
+ "license": "UNLICENSED",
34
+ "engines": {
35
+ "node": ">=18.0.0",
36
+ "npm": ">=9.0.0"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "bin",
41
+ "README.md"
42
+ ],
43
+ "dependencies": {
44
+ "next": "16.1.6",
45
+ "react": "19.2.3",
46
+ "react-dom": "19.2.3",
47
+ "server-only": "^0.0.1",
48
+ "zod": "^4.3.6"
49
+ },
50
+ "devDependencies": {
51
+ "@tailwindcss/postcss": "^4",
52
+ "@types/node": "^20",
53
+ "@types/react": "^19",
54
+ "@types/react-dom": "^19",
55
+ "babel-plugin-react-compiler": "1.0.0",
56
+ "eslint": "^9",
57
+ "eslint-config-next": "16.1.6",
58
+ "tailwindcss": "^4",
59
+ "typescript": "^5"
60
+ }
61
+ }