gitmyhub

DepArchitect

Python ★ 13 updated 16d ago

本项目是一个vibe coding项目,可以当作学习vibe coding的一个实战案例,或者当作一个独立的开源项目来使用。 项目采用的是opencode+omo-slim+openspec的开发流程和规范

A Python command-line tool that analyzes your project's dependency health, detecting circular imports, duplicate libraries, and unnecessary packages, and gives an overall architectural quality score.

PythonASTNetworkXHTMLsetup: easycomplexity 2/5

DepArchitect is a command-line tool for Python developers who want to understand and manage the health of their project's dependencies at an architectural level, not just check for outdated packages or security holes. The project was built as a practical learning case for a development style called vibe coding, using a workflow that combines open tools for planning, specification, and code generation.

Most dependency tools tell you which packages are out of date or have known vulnerabilities. DepArchitect goes further by looking at the shape and structure of your dependencies: how deep the dependency chain runs, whether multiple packages are solving the same problem, whether your own internal modules create circular import loops, and whether adding a new library is actually necessary given what you already have. It outputs results in the terminal, as JSON, or as interactive HTML reports with visualizations.

The tool has four main commands. The scan command checks a project for things like unused dependencies, duplicate capabilities, overly heavy packages, and a calculated health score. The cycles command maps how your own Python files import each other, highlighting circular imports and modules that are too tightly connected to everything else. The review-add command takes a proposed new dependency and a feature description, then checks whether your existing packages could already handle it and what the cost of adding the new one would be. The review-upgrade command assesses the risk of upgrading a specific package, such as moving from an older version of a popular data-validation library to a newer one that has breaking changes.

Under the hood, the static analysis runs first using Python's abstract syntax tree parser, a dependency graph library, and metadata inspection tools. An optional AI layer sits on top and can explain findings or make suggestions, but it does not change the scores or invent new issues. All judgments come from the rule-based analysis engine.

The project is actively being built. Dependency scanning and circular import detection are complete, and unused dependency detection, duplicate capability detection, health scoring, and the review commands are scheduled for delivery by the end of June 2026.

Where it fits