Refactor import and workflow services plus adapter seams

This commit is contained in:
Jarca
2026-07-03 08:25:01 +09:00
parent ac78e94571
commit f42bc4aa7d
53 changed files with 3420 additions and 2497 deletions
@@ -0,0 +1,23 @@
# BAT-012 Design
## Architecture summary
- Introduce `jarca_ledger_mcp/application/imports_service.py` as the single application-layer home for import preview/import/rollback orchestration.
- Introduce `jarca_ledger_mcp/infrastructure/parsers/` as the parser seam so application code no longer imports top-level parser implementations directly.
- Keep current top-level parser modules for compatibility if needed, but route application/shared usage through the infrastructure seam.
- Preserve `application/import_transfer_services.py` as the advanced workflow home; import-facing public functions become delegations into `imports_service.py`.
## Changed areas
- application import orchestration
- infrastructure parser seam
- service export surface / compatibility proxy
- import regression verification docs
## Key decisions
1. Parser relocation is seam-first, not algorithm rewrite.
2. Import account auto-linking/classification stays in the application layer, not in parser modules.
3. Public API/tool names remain unchanged.
## Verification focus
- Import preview/import/rollback regression
- Evidence field preservation
- No breakage in MCP discovery and public exports