chore(cli): commands import infrastructure directly, contradicting the documented architecture

Open
#470 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript

Research direction

Start with PR #795, which contains the replacement architecture documentation and the related context-graph, restricted-import, and orchestrator dependency guards. Verify that the documented model matches the presentation-to-runtime composition path, that bounded contexts do not import either outer boundary, and that the architecture gates remain green before closing this issue after the PR merges.

Written by the indexing model from the issue text.

Description

Context

The old CLI documentation described a strict three-layer model and made command imports from infrastructure/deps appear contradictory.

PR #795 replaces that model with bounded contexts plus two outer boundaries:

  • presentation parses and renders the CLI;
  • runtime is the composition root that wires concrete ports and use cases;
  • kernel and bounded contexts never reach back into either outer boundary.

Decision

A presentation command may call the runtime wiring factory. This is intentional composition, not an application/domain dependency leak.

The factory is invoked per action because project root, output and verbosity are command-specific. Building one global dependency graph in cli.ts would either create it with incomplete command context or move command concerns into the entry point.

The relevant architectural rule is therefore: contexts depend only on permitted inward context edges; presentation and runtime may depend on them. #795 enforces this through the context graph, restricted-import and orchestrator dependency guards.

Acceptance criteria

  • #795 documentation states bounded contexts, not the obsolete three-layer rule.
  • Presentation-to-runtime wiring remains the only outer composition path.
  • No bounded context imports presentation or runtime.
  • #795 architecture gates remain green.
  • #795 links this issue; close it after merge.

Boundary

Do not move the wiring into every command, and do not introduce a global pre-built dependency graph merely to satisfy the former layer diagram.

Dominant language
TypeScript
Stars
481
Forks
45
Avg merge
17h 40m
Merged PRs (30d)
106

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ai-driven-dev/framework

All issues in ai-driven-dev/framework

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.