Skip to content

docs: add monorepo dependency analysis report#73

Draft
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1782308871-dependency-analysis
Draft

docs: add monorepo dependency analysis report#73
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1782308871-dependency-analysis

Conversation

@devin-ai-integration

Copy link
Copy Markdown

What does this PR do?

Adds a comprehensive dependency analysis report at docs/dependency-analysis.md that maps the full inter-package dependency graph of the cal.com monorepo.

The analysis was performed by scanning actual source-level imports (not just package.json declarations) across all 23 @calcom/* packages and apps/web/.

Key findings:

  • 17 direct circular dependencies identified and severity-ranked (most critical: features <-> trpc with 693 cross-imports, features <-> lib with 896)
  • 262 transitive cycles (length 3-5)
  • 6 packages with excessive fan-out (8+ distinct package imports), led by @calcom/features at 14
  • Massive undeclared dependencies: @calcom/trpc and @calcom/features each have 10+ undeclared @calcom/* imports resolved only via workspace hoisting
  • ~90 files across packages import from @calcom/web, inverting the dependency hierarchy
  • @calcom/atoms has 0 declared @calcom/* deps but imports from 13 packages at source level

Report includes:

  1. Full package inventory (23 packages in 4 groups)
  2. Source-level import count matrix
  3. Circular dependency catalog with severity
  4. Fan-out / fan-in metrics
  5. Undeclared dependency audit
  6. Coupling hotspot analysis with root causes
  7. 8 prioritized refactoring recommendations with concrete approaches
  8. Ideal dependency direction diagram

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. This PR is a documentation addition.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - documentation only.

How should this be tested?

This is a documentation-only PR. Review the report at docs/dependency-analysis.md for accuracy against the codebase.

Checklist

  • My code follows the style guidelines of this project
  • I have checked if my changes generate no new warnings

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/dd472c13d6af4c188176cb4e504930c0
Requested by: @bsmitches

Comprehensive analysis of package dependency graph covering:
- Source-level import matrix for all 23 @calcom/* packages
- 17 direct circular dependencies identified and severity-ranked
- Fan-out/fan-in metrics for all packages
- Undeclared phantom dependency audit
- 8 prioritized refactoring recommendations
@bsmitches bsmitches self-assigned this Jun 24, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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