You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a8d9e76
Browse filesBrowse the repository at this point in the historyBrowse files
claude: Eliminate circular dependency between engine.ts and command-utils.ts
Refactored to break the 2-cycle between src/execute/engine.ts ↔ src/command/command-utils.ts
by moving CLI command logic out of the core engine module.
## Changes
**Created:** src/command/call/engine-cmd.ts
- Moved engineCommand definition from engine.ts
- Imports core functions: executionEngine(), executionEngines()
- Imports initializeProjectContextAndEngines from command-utils.ts
- Follows existing command pattern (check/cmd.ts, render/cmd.ts)
**Modified:** src/execute/engine.ts
- Removed engineCommand export (40 lines)
- Removed imports: Command from cliffy, initializeProjectContextAndEngines
- Now contains only core engine logic
**Modified:** src/command/call/cmd.ts
- Updated import to use new ./engine-cmd.ts
**Modified:** src/command/command-utils.ts
- Made ProjectContext import type-only
## Impact
The 2-cycle is eliminated:
- engine.ts no longer imports from command-utils.ts
- command-utils.ts cleanly imports from engine.ts
- engineCommand now lives in proper command location
- Better architecture: CLI separated from core engine logic
- Net reduction: 38 lines of code
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments