# REQ-017 Advanced finance workflow service split and compatibility-preserving domain isolation - Status: Implemented - Type: Non-Functional - Priority: High - Owner: 렛저장인 - Source Discovery: `docs/discovery/dcy-011_20260703_backend-refactor-phase4-write-import-workflow-adapter-narrowing.md` - Batch: BAT-013 - Created At (KST): 2026-07-03 07:55 KST - Approved At (KST): 2026-07-03 07:55 KST - Implemented At (KST): 2026-07-03 08:01 KST ## 1. 배경 `REQ-015`와 `REQ-016`으로 transactional write path와 import pipeline seam은 좁아졌지만, cross-transfer matching/review, balance reconciliation, manual asset/snapshot/net-worth workflows, uncategorized workbench는 여전히 broad application modules(`import_transfer_services.py`, `transaction_report_services.py`, `asset_account_services.py`, `categorization_services.py`)에 흩어져 있다. ## 2. Intent 이 REQ의 목적은 advanced finance workflows를 domain-oriented application modules로 추가 분리해 import/write/read service와 책임이 겹치지 않게 하는 것이다. public API, MCP contracts, dashboard behavior는 유지해야 하며, domain-heavy helpers는 owning workflow service로 이동해야 한다. ## 3. 범위 ### In Scope - cross-transfer matching/review queue를 `application/cross_transfer_service.py`로 이동 - balance reconciliation을 `application/reconciliation_service.py`로 이동 - manual asset CRUD / snapshot / liquidity / net-worth workflows를 `application/assets_service.py`로 이동 - uncategorized list/summary/workbench/recommendation apply 흐름을 `application/uncategorized_workbench_service.py`로 이동 - 기존 broad modules는 compatibility delegation을 유지 ### Out of Scope - MCP/Streamlit adapter surface narrowing - baseline docs final update - tool contract rename or semantic changes - destructive migration ## 4. Requirement ### FR-1. Advanced workflow ownership split - cross-transfer, reconciliation, assets, uncategorized workbench는 각각 owning application module로 이동해야 한다. - helper 함수도 첫 소비자와 함께 이동해 broad module 내부 숨은 결합을 줄여야 한다. ### FR-2. Compatibility-preserving delegation - `service.py`, MCP tool names, dashboard call signatures, response envelope은 유지해야 한다. - 기존 broad modules는 필요 시 thin delegation/re-export layer로 남을 수 있다. ### FR-3. Regression-safe domain isolation - cross-transfer tests, asset snapshot/manual asset tests, reconciliation tests, uncategorized workflow tests, full pytest가 PASS 해야 한다. ## 5. Acceptance Criteria - AC-1: `cross_transfer_service.py`, `reconciliation_service.py`, `assets_service.py`, `uncategorized_workbench_service.py`가 생성되고 owning workflow 구현이 이동한다. - AC-2: public API/MCP/dashboard contract가 유지된다. - AC-3: workflow-focused regression과 full pytest가 PASS 한다. - AC-4: BAT-013 implementation/verification 문서가 실제 변경 파일과 검증 결과를 반영한다. ## 6. Impacted Area - `jarca_ledger_mcp/application/import_transfer_services.py` - `jarca_ledger_mcp/application/transaction_report_services.py` - `jarca_ledger_mcp/application/asset_account_services.py` - `jarca_ledger_mcp/application/categorization_services.py` - `jarca_ledger_mcp/application/{cross_transfer,reconciliation,assets,uncategorized_workbench}_service.py` - `jarca_ledger_mcp/service.py` - `tests/test_cross_account_transfer_matching.py` - `tests/test_asset_snapshots.py` - `tests/test_contract_regression.py` - `tests/test_categorization.py` - `tests/test_service.py` ## 7. Change Log - 2026-07-03 07:55 KST: dcy-011 Phase 6 advanced workflow split 범위를 바탕으로 REQ-017을 생성하고 BAT-013 입력으로 즉시 승인했다. - 2026-07-03 08:01 KST: advanced workflow service extraction, full pytest, MCP discovery evidence를 근거로 Implemented로 전환했다.