Files
KArtSell.Aegis/docs/v12_5/03_TARGET_ARCHITECTURE_SOLID_REFACTORING.md
T
kjh2064 dcd1322d41
ci / backend (push) Failing after 12s
ci / frontend (push) Failing after 19s
ci / static (push) Failing after 45s
Initial commit: Add project files
2026-08-02 05:15:36 +09:00

2.0 KiB

목표 아키텍처·SOLID·리팩터링 실행기준

구조

단일 배포 Modular Monolith를 유지한다. v10.0의 논리 모듈은 보존하되 Delivery 관점에서는 다음 6개 작업열로 단순화한다.

  1. Platform/Governance: Host, Identity, Capability, Audit, Outbox/Inbox
  2. Reference/Data: SecurityMaster, MarketData, CorporateActions, FundamentalsPIT
  3. Research/Signal: Factors, Forecast, Sell/Reentry, Frozen Backtest
  4. Portfolio/Advisory: Ledger, Risk, IPS, Recommendation, Review/Publish
  5. Evaluation/ModelOps: Outcome, Scorecard, Drift, Challenger, Promotion Evidence
  6. Operations: Reconciliation, Reporting, Alert, DR, Release Evidence

논리 모듈의 데이터 소유권은 바꾸지 않는다. 작업열은 PM/PL의 조정 단위다.

SOLID

원칙 적용 금지
SRP Endpoint=HTTP, Application=orchestration, Policy=순수결정, Adapter=I/O God Service, Job 내부 퀀트수식
OCP 명시적 Policy/Adapter/Metric Registry reflection plugin framework
LSP PIT·단위·오류·멱등 contract test mock success만으로 교체 승인
ISP IClock, ContextReader, SourceAdapter, OutboxWriter 대형 범용 Service/Repository
DIP Domain은 FastEndpoints/Dapper/Npgsql/Hangfire를 모름 Infrastructure type의 Domain 침투

리팩터링 규칙

  • 동작보존 리팩터링과 정책/수식 변경은 별도 PR로 분리한다.
  • Characterization/Golden을 먼저 만든 뒤 작은 단위로 바꾼다.
  • 중복 코드는 모양이 아니라 의미와 변경축이 같을 때만 공통화한다.
  • 3회 반복 전 공통 컴포넌트 승격을 금지한다.
  • 모든 interface 생성, 모든 테이블 event sourcing, 모든 기능 microservice화는 금지한다.
  • 기술부채는 Owner, 영향, Trigger, Gate, Exit Test를 가진다.

Vertical Slice Done

REQ → Policy/Data → Endpoint/Job → DB Migration → Event/Outbox → UI → Tests → Metrics/Alert → Runbook/Rollback → Release Evidence

어느 한 요소가 비어 있으면 Done이 아니다.