What's your approach to measuring architecture entropy in legacy Python codebases?

Posted by HearingSpare2729@reddit | Python | View on Reddit | 0 comments

I've been experimenting with a weighted formula to quantify structural decay:

- Hidden Dependencies x 0.25

- Mutation Spread x 0.20

- Shared State Contamination x 0.20

- Responsibility Overlap x 0.15

- Error Propagation Amplification x 0.20

Tested it on a script with hardcoded credentials, SQL injection, and a God Function. Got entropy score 76/100 — Degrading. Technical debt came out to 48 engineering hours.

Curious if others have formal ways to measure this or if you just go by intuition during code review?