Skip to content

feat(arch): add arch-metrics command — fan-in/out, instability, god-module detection (closes #61)#109

Merged
Wolfvin merged 1 commit into
mainfrom
feat/61-arch-metrics
Jun 30, 2026
Merged

feat(arch): add arch-metrics command — fan-in/out, instability, god-module detection (closes #61)#109
Wolfvin merged 1 commit into
mainfrom
feat/61-arch-metrics

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Implements issue #61: architecture metrics command.

Command

codelens arch-metrics [workspace] — computes fan-in, fan-out, instability, and god-module detection from the SQLite graph.

Flags

  • --threshold-fanin N (default 10)
  • --threshold-fanout N (default 15)
  • --sort-by instability|fan-in|fan-out|name

Metrics

  • Fan-in: distinct source files with edges pointing TO this module
  • Fan-out: distinct target files that edges FROM this module point to
  • Instability: fan-out / (fan-in + fan-out) — 0=stable, 1=instable
  • God-module: flagged when fan-in > threshold OR fan-out > threshold

Files

  • New: scripts/commands/arch_metrics.py
  • Synced: command count 65→66 via sync_command_count.py --apply

Verification

  • Test suite: 1 pre-existing failure (test_compact_format graph data, unrelated)
  • codelens arch-metrics . produces valid JSON output

Closes #61

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Wolfvin Wolfvin merged commit f814c6b into main Jun 30, 2026
0 of 6 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

[FEATURE] Architecture analysis metrics — modularity, fan-in/out, inheritance, change coupling, hotspots

1 participant