Skip to content

docs: add DI pattern guide to knowledge-base.md#26751

Merged
eunjae-lee merged 1 commit intomainfrom
devin/1768224246-di-pattern-guide
Jan 12, 2026
Merged

docs: add DI pattern guide to knowledge-base.md#26751
eunjae-lee merged 1 commit intomainfrom
devin/1768224246-di-pattern-guide

Conversation

@eunjae-lee
Copy link
Contributor

What does this PR do?

Adds a comprehensive guide on the Dependency Injection (DI) pattern to agents/knowledge-base.md. This documentation helps developers understand how to properly use the DI system and avoid common mistakes.

The guide covers:

  • Core concepts (Tokens, Modules, Containers)
  • Step-by-step example using BusyTimesService as a reference
  • Common mistakes to avoid:
    • Creating repositories/services with static methods
    • Manually instantiating classes instead of using DI containers
    • Importing Prisma directly in services instead of using repository injection
  • Instructions for adding new services to the DI system
  • Benefits of using DI

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. N/A - this is internal agent documentation.
  • 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 change. Review the guide for:

  • Accuracy of the code examples against actual implementations in packages/features/di/
  • Clarity of the step-by-step instructions
  • Completeness of the common mistakes section

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Link to Devin run: https://app.devin.ai/sessions/67c17d8239da4388b0a9efbc4689a82c
Requested by: @eunjae-lee

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
@devin-ai-integration
Copy link
Contributor

🤖 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 that start with 'DevinAI' or '@devin'.
  • 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 and CI monitoring

@eunjae-lee eunjae-lee marked this pull request as ready for review January 12, 2026 13:28
@graphite-app graphite-app bot added the core area: core, team members only label Jan 12, 2026
@graphite-app graphite-app bot requested a review from a team January 12, 2026 13:29
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@eunjae-lee eunjae-lee merged commit 70d5a78 into main Jan 12, 2026
67 of 68 checks passed
@eunjae-lee eunjae-lee deleted the devin/1768224246-di-pattern-guide branch January 12, 2026 13:33
Anshumancanrock pushed a commit to Anshumancanrock/cal.com that referenced this pull request Jan 12, 2026
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – cal-companion January 13, 2026 09:19 Inactive
@vercel vercel bot temporarily deployed to Preview – dev January 13, 2026 09:19 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants