Skip to content

docs: enhance dependency flow explanation in README#13

Closed
ahmedshahriar wants to merge 0 commit intomainfrom
staging
Closed

docs: enhance dependency flow explanation in README#13
ahmedshahriar wants to merge 0 commit intomainfrom
staging

Conversation

@ahmedshahriar
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings November 8, 2025 00:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the architecture documentation in the README to more accurately describe the dependency flow between layers in the Domain-Driven Design structure. The update clarifies that model and application both depend directly on domain rather than forming a linear chain.

Key changes:

  • Restructured the dependency flow description from a linear chain to a more accurate layered model
  • Explicitly lists the dependencies for each layer (domain, application, model, infrastructure)
  • Added guidance about avoiding direct dependencies to non-adjacent layers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

README.md Outdated
- The `application` layer depends on `domain`.
- The `model` layer depends on `domain`.
- The `infrastructure` layer depends directly on `model`, and transitively on `application` and `domain` through `model`. Direct dependencies to non-adjacent layers should be avoided unless absolutely necessary and well-justified.
This layered approach ensures clean separation and maintainability. For best practices, dependencies should flow through adjacent layers (e.g., infrastructure → model → application → domain) to maintain encapsulation and layer cohesion.
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The dependency chain example "infrastructure → model → application → domain" is incorrect. According to the documented structure, model depends on domain (line 212), not on application. The actual dependency structure has two parallel paths:

  • infrastructure → model → domain
  • infrastructure → application → domain

A more accurate example would be: "e.g., infrastructure → {model, application} → domain" or simply remove the specific chain example since line 213 already explains that infrastructure can depend on multiple layers.

Suggested change
This layered approach ensures clean separation and maintainability. For best practices, dependencies should flow through adjacent layers (e.g., infrastructure → modelapplication → domain) to maintain encapsulation and layer cohesion.
This layered approach ensures clean separation and maintainability. For best practices, dependencies should flow through adjacent layers (e.g., infrastructure → {model, application} → domain) to maintain encapsulation and layer cohesion.

Copilot uses AI. Check for mistakes.
README.md Outdated
- The `domain` layer is independent.
- The `application` layer depends on `domain`.
- The `model` layer depends on `domain`.
- The `infrastructure` layer depends directly on `model`, and transitively on `application` and `domain` through `model`. Direct dependencies to non-adjacent layers should be avoided unless absolutely necessary and well-justified.
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The statement that infrastructure depends "transitively on application...through model" is inaccurate. Based on the codebase (e.g., core/infrastructure/inference_pipeline_api.py), infrastructure has direct dependencies on both application and model, not just transitive dependencies through model.

Consider revising to: "The infrastructure layer depends directly on model and application, and transitively on domain through both. Direct dependencies to non-adjacent layers should be avoided unless absolutely necessary and well-justified."

Suggested change
- The `infrastructure` layer depends directly on `model`, and transitively on `application` and `domain` through `model`. Direct dependencies to non-adjacent layers should be avoided unless absolutely necessary and well-justified.
- The `infrastructure` layer depends directly on both `model` and `application`, and transitively on `domain` through both. Direct dependencies to non-adjacent layers should be avoided unless absolutely necessary and well-justified.

Copilot uses AI. Check for mistakes.
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.

2 participants