feat: add vajra governance command with bus factor, Gini, churn metrics#32
Closed
copyleftdev wants to merge 2 commits into
Closed
feat: add vajra governance command with bus factor, Gini, churn metrics#32copyleftdev wants to merge 2 commits into
copyleftdev wants to merge 2 commits into
Conversation
…, and contributor churn Implements issue #28: built-in governance metrics that were previously computed externally in Python. Adds vajra-stats/src/governance.rs with bus factor (50%/80%), Shannon entropy, Gini coefficient, top-K share, one-commit rate, monthly contributor churn, and contributor half-life. Adds `vajra governance` CLI command with JSON/text/markdown output. All algorithms are O(n log n) or better, deterministic (BTreeMap), and contain no unwrap/expect/panic. Includes 18 unit tests covering known-value, edge-case, property, and rendering scenarios. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ba10312 to
2439fc7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vajra governancecommand computing bus factor, Gini coefficient, contributor churn, and half-lifevajra-stats/src/governance.rsmodule with 7 governance algorithms--author-fieldand--time-fieldflags, JSON/text/markdown outputCloses #28
Example
Test plan
🤖 Generated with Claude Code