Files
jarca-ledger-mcp/docs/batches/bat-008_20260630_asset-snapshots-manual-assets-read-mcp/planning.md
T

38 lines
2.3 KiB
Markdown

# BAT-008 Planning
## Scope
- Implement REQ-009: `asset_snapshots`/`manual_assets` valuation model, authority-source rule, month-end manual snapshot policy support.
- Implement REQ-010: asset snapshot read MCP, net-worth timeseries read MCP, manual assets read MCP, dashboard/MCP alignment.
- Preserve REQ-005 safety fallback when new tables are empty.
- Use synthetic/temp data only for tests and verification evidence.
## Dependencies
- dcy-008 confirmed Discovery and approved REQ-009/REQ-010.
- Existing REQ-005 dashboard liquidity/net-worth flow and `accounts.last_balance` authority-source baseline.
- Existing MCP server/service pattern in `jarca_ledger_mcp/server.py`, `jarca_ledger_mcp/service.py`, `jarca_ledger_mcp/db.py`.
- Additive/idempotent SQLite migration discipline and synthetic-only evidence policy.
## Work plan
1. Create BAT-008 standard batch docs and register entry.
2. Add schema/model support for `manual_assets` and `asset_snapshots` with safe empty-table fallback.
3. Add service-layer valuation helpers, snapshot accumulation/report functions, and dashboard alignment logic.
4. Add read-only MCP tool endpoints/contracts for snapshot read, net-worth timeseries, and manual assets read.
5. Update baseline docs (`docs/data-model.md`, `docs/interface-contract.md`, `docs/project-structure.md`, `docs/runtime-flows.md`).
6. Run narrow validation first (targeted tests / lint / smoke as applicable), then broader regression if narrow gates pass.
7. If evidence satisfies ACs, move BAT-008 to release-candidate and REQ-009/REQ-010 to Implemented.
## Design Gate
- Result: standard batch 유지.
- Reason: schema, service, MCP contract, dashboard alignment, baseline docs를 함께 변경하며 interface/data/fallback 설계가 필요하다.
## Risks and mitigations
- Authority-source drift between dashboard and MCP: mitigate by centralizing valuation helpers and writing shared regression tests.
- Empty new tables breaking existing REQ-005 flows: mitigate by explicit fallback tests and additive migrations only.
- Double counting between account-backed assets and manual assets: mitigate by clearly separating source responsibility and documenting inclusion/exclusion rules.
- Snapshot history ambiguity: mitigate by storing basis date, source type, and memo for every snapshot row.