Skip to content

refactor: reduce Ecli.py size by service delegation #53

@SSobol77

Description

@SSobol77

refactor: reduce Ecli.py size by service delegation

Purpose

Reduce Ecli.py responsibilities by delegating extracted concerns to Phase 1 services.

Mandatory First Step

Before editing files:

  1. Inspect the actual repository structure.
  2. Verify real package roots, CLI entrypoints, and test conventions.
  3. Do not assume imports from non-existent modules.
  4. Adjust file paths to the real repository layout if required.
  5. Document any path deviation in the PR description.

Development Log Invariant

All generated development logs, dry-run reports, smoke outputs, test evidence, and agent-generated debug artifacts must be written only under:

logs/

Forbidden generated-artifact locations:

.ecli/
.ecli/vmlab/
src/
tests/
tmp/
.tmp/
.cache/
$HOME/
/tmp/
project root outside logs/

Target Files

Expected target files, adjusted only if real repository layout requires:

src/ecli/core/Ecli.py
src/ecli/services/**
tests/characterization/**

Scope

Migration targets in priority order:

  1. configuration access → registry.config
  2. project context → registry.project
  3. doctor invocations → registry.doctor
  4. plan-mediated operations → registry.plans

This is the actual Strangler Fig reduction step. Adding services without reducing Ecli.py does not complete Services Foundation.

Dependencies

Depends on characterization tests and all Phase 1 core services.

Acceptance Criteria

  • baseline LOC for Ecli.py is measured and recorded in PR
  • Ecli.py LOC reduced by at least 30% from baseline or explicit documented exception approved
  • all characterization tests still pass
  • no new responsibilities are added to Ecli.py
  • each migration is separately reviewable
  • no logs outside logs/

References

  • docs/architecture/services-foundation.md §9 Step 9
  • docs/architecture/services-foundation.md §12
  • docs/architecture/services-foundation.md §3

Labels

  • type:implementation
  • area:services
  • phase:1D
  • priority:high

Milestone

v0.2.0 — Services Foundation

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:servicesShared service-layer architectureimplementationProduction code implementationphase:1DPhase 1D — Wiring and minimal CLI surfacepriority:highHigh-priority taskservicesShared service-layer architecturetype:implementationProduction code implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions