Skip to content

feat(cli): add governance subcommand for repo maturity scoring#52

Merged
hummbl-dev merged 2 commits into
mainfrom
feat/claude/governance-score
Apr 19, 2026
Merged

feat(cli): add governance subcommand for repo maturity scoring#52
hummbl-dev merged 2 commits into
mainfrom
feat/claude/governance-score

Conversation

@hummbl-dev
Copy link
Copy Markdown
Owner

Summary

  • New arbiter governance /path/to/repo command scoring repos 0-100 on governance artifacts
  • 10 weighted checks: LICENSE (20), CONTRIBUTING (15), SECURITY (15), README (10), CODE_OF_CONDUCT (10), DCO/CLA (10), issue templates (5), PR templates (5), CHANGELOG (5), CI/CD (5)
  • License type auto-detection (MIT, Apache, GPL, BSD, etc.) from file content
  • DCO detection via Signed-off-by in recent git commits or CLA bot config
  • --json flag for structured output
  • 11 tests covering empty repo, full governance, partial scoring, license detection, CLI output

Test plan

  • test_empty_repo_scores_zero — empty repo gets 0
  • test_full_governance — all artifacts present = 100
  • test_license_detection — MIT/Apache/GPL/unknown detection
  • test_partial_governance — LICENSE + README = 30 points
  • test_json_output — valid JSON with correct structure
  • test_governance_help — CLI help renders
  • test_readme_too_short — README under 100 chars fails
  • test_signed_off_by_detection — DCO from git log
  • test_alternative_license_names — LICENCE variant
  • test_ci_cd_travis — .travis.yml detection
  • test_dataclass_fields — dataclass construction

🤖 Generated with Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4b881b323

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +186 to +190
ci_dirs = [
repo_path / ".github" / "workflows",
repo_path / ".circleci",
repo_path / ".gitlab-ci.yml",
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Detect .gitlab-ci.yml as CI file

Repositories that rely solely on GitLab CI are currently scored as missing CI/CD because .gitlab-ci.yml is placed in ci_dirs and only checked with is_dir(), which can never succeed for this file. In that case the CI_CD check incorrectly fails and the total governance score is understated by 5 points. Move .gitlab-ci.yml into the file checks (or add a dedicated is_file() check) so GitLab-based repos are scored correctly.

Useful? React with 👍 / 👎.

@hummbl-dev hummbl-dev force-pushed the feat/claude/governance-score branch from a4b881b to ee8f713 Compare April 19, 2026 02:07
Claude (agent) and others added 2 commits April 18, 2026 22:09
Scores repos 0-100 on governance artifacts: LICENSE, CONTRIBUTING,
SECURITY, README, CODE_OF_CONDUCT, issue/PR templates, CHANGELOG,
DCO/CLA process, and CI/CD config. Supports --json output. 11 tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hummbl-dev hummbl-dev force-pushed the feat/claude/governance-score branch from 1f028f4 to 072c5e3 Compare April 19, 2026 02:10
@hummbl-dev hummbl-dev merged commit a32593d into main Apr 19, 2026
3 checks passed
@hummbl-dev hummbl-dev deleted the feat/claude/governance-score branch April 19, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant