Skip to content

V2: resolve application vs usecases layer ambiguity #1075

Description

@ScriptedAlchemy

Context

PR #707 has two foundational crates whose names imply the opposite of their actual architectural roles:

  • tracedecay-application is the bottom-of-stack ports/contracts layer.
  • tracedecay-usecases is the top-of-stack product application/use-case orchestration layer.

Both crates contain long module-level explanations because the one-shot split historically conflated them. V2 has not shipped, so we should remove the ambiguity rather than preserve it as permanent architecture documentation.

Goal

Make crate names match responsibilities and remove split-era semantic confusion.

Proposed direction

Converge toward a model such as:

  • tracedecay-domain: pure domain/value contracts.
  • tracedecay-contracts (or equivalent): ports + transport-neutral request/result contracts.
  • tracedecay-application: product use-case orchestration.

This likely means renaming current tracedecay-application to a contracts/ports name and current tracedecay-usecases to tracedecay-application, but choose the minimal dependency-safe form after inventorying callers.

Work

  • Inventory what belongs in domain vs ports/contracts vs orchestration.
  • Rename/re-home the two layers so conventional names reflect actual responsibility.
  • Remove split-era explanatory comments that exist only to explain misleading names.
  • Repoint consumers directly; do not retain crate/module aliases solely for feat: TraceDecay V2 delivery (PR8–PR13) + daemon performance, memory, and reliability overhaul #707 compatibility.
  • Preserve the useful dependency inversion boundary where ports have multiple or security-sensitive implementations.
  • Do not collapse unrelated runtime/storage behavior into the contracts layer.

Acceptance criteria

Related: #707.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions