mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
2.1 KiB
2.1 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-76 | Decompose anki-integration orchestrator into workflow services | To Do | 2026-02-18 11:43 | 2026-02-18 11:43 |
|
|
high |
Description
src/anki-integration.ts remains a large orchestration hotspot after earlier splits. This task executes decomposition work (beyond evaluation) by extracting cohesive workflows and narrowing the central orchestrator to composition + policy decisions.
Suggestions
- Prefer workflow modules over helper sprawl:
card-update-workflow,media-attachment-workflow,known-word-sync-workflow,field-mapping-workflow. - Keep side-effect adapters explicit (AnkiConnect API, fs/media, notification).
- Introduce a small façade API from
anki-integration.tsto preserve callsite stability.
Action Steps
- Convert
TASK-57findings into concrete extraction map with target module ownership. - Extract top two highest-churn workflows first (card creation/update and media attachment).
- Move pure mapping/normalization logic to isolated pure modules with unit tests.
- Keep backward-compatible public API for existing callsites.
- Add regression tests for key mining flows (new card, update existing, audio-card mark, failure handling).
- Update
docs/anki-integration.mdwith new module boundaries.
Acceptance Criteria
- #1
src/anki-integration.tsreduced to orchestration/composition role - #2 Extracted workflow modules have focused tests
- #3 Existing mining behavior remains unchanged in regression tests
- #4 Documentation updated with ownership boundaries
Definition of Done
- #1
bun run test:core:distpasses with Anki-related suites green - #2 No callsite API breakage outside planned changes