SPEC v0.3: orchestrator resolutions of the plans' open points
Records D-004 and D-015 to D-025: shells and ownership, server seams (router middleware, rate_limit layer, tasks::start, AuditWriter and PushQueue traits, next_occurrence_date in kvitt-domain, M3 owns recurring generation, M4 lands after M3), OpenAPI parsed-value equality, feature convention and strings, empty fake scenario and resolveRange exception, shared ledger rows and editor fields in :core:design, no bundled font, pruning at 04:00, development infrastructure as M2c-dev built it, M2c-pi allowances, release keystore, production import procedure. Plans and prompts close their open points; HANDOFF rewritten to the real state; CLAUDE.md: implementation agents never edit SPEC.md or docs/decisions.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-5
@@ -11,7 +11,7 @@ Implement the one-off CLI `kvitt-import` that imports Splitwise CSV exports, one
|
||||
5. SPEC §14.1 SQLite schema v1 (`import_key` columns, `accounts`, `expenses`, `expense_splits`, `settlements`, `settlement_allocations`, `audit_log`) and its server-side rules.
|
||||
6. SPEC §9.1 Splits (exact rule), §9.6 Limits and validation, §14.4.7 Audit diff (`create`), §14.5.2 (`compute_split`, `validate_settlement`).
|
||||
7. SPEC §11.2 (row M9), §14.7, §14.8.
|
||||
8. Files: `server/crates/kvitt-server/src/lib.rs` and the modules it exposes (DB pool, sequence, audit writer), `server/Cargo.toml`, `CLAUDE.md` (ANTI-PATTERNS: never commit personal data or the Splitwise CSV).
|
||||
8. Files: `server/crates/kvitt-server/src/lib.rs` and the modules it exposes (DB pool, sequence, the `AuditWriter` trait and M4's implementation, D-015), M2a's shell of `server/crates/kvitt-import/` (D-004), `server/Cargo.toml`, `CLAUDE.md` (ANTI-PATTERNS: never commit personal data or the Splitwise CSV).
|
||||
|
||||
## 3. Already established
|
||||
- Command shape: `kvitt-import --db <path> --file <csv> --account "<Kvitt account name>" --user "<Splitwise name>=<user id>" --user "<Splitwise name>=<user id>" [--fx <CUR>=<SEK per unit>]... [--dry-run]` (§10.8).
|
||||
@@ -38,8 +38,8 @@ Edit nothing outside these paths; a needed change elsewhere is a contract reques
|
||||
## 5. Deliverables
|
||||
- `server/crates/kvitt-import/Cargo.toml`: depends on `kvitt-domain` and `kvitt-server` (library).
|
||||
- `server/crates/kvitt-import/src/main.rs`: CLI parsing per §10.8.
|
||||
- `server/crates/kvitt-import/src/**`: CSV reader (quoting, both header variants, member matching by name), row classification (expense, payment, total, blank), amount parsing, split derivation, fx conversion, import key, category mapping, writer (one transaction, audit through the server's audit writer), summary.
|
||||
- `server/crates/kvitt-import/data/splitwise_categories.csv`: the mapping table, columns `splitwise_name,language,default_key`, every English and Swedish name of the §10.8 table (location chosen inside the crate because §14.7 gives `contracts/**` to M1; the orchestrator may move it).
|
||||
- `server/crates/kvitt-import/src/**`: CSV reader (quoting, both header variants, member matching by name), row classification (expense, payment, total, blank), amount parsing, split derivation, fx conversion, import key, category mapping, writer (one transaction, audit through the `AuditWriter` trait, nothing through `PushQueue`), summary.
|
||||
- `server/crates/kvitt-import/data/splitwise_categories.csv`: the mapping table, columns `splitwise_name,language,default_key`, every English and Swedish name of the §10.8 table (location fixed in §10.8 and §14.7, v0.3).
|
||||
- `server/crates/kvitt-import/tests/fixtures/*.csv`: synthetic CSVs only (English variant, Swedish variant with reversed member order, quoted commas, payments in both languages, totals rows in both languages, blank rows, a non-SEK row, a truncated description, an unknown category, an invalid row, duplicate identical lines).
|
||||
- `server/crates/kvitt-import/tests/*.rs`: integration tests against a temp database created with the server's migrations.
|
||||
|
||||
@@ -72,9 +72,8 @@ Where in the flow: already done; both exports are in `export/` (git-ignored) and
|
||||
- Branch `agent-m9`, head commit hash after rebasing on `main`.
|
||||
- Gate output: fmt and clippy exit status, every `test result:` line.
|
||||
- Versions of crates added, with sources.
|
||||
- Location of the category table file.
|
||||
- Optional dry-run aggregates (row counts per file, unmapped category names with counts), if run.
|
||||
- Numbering used or `TODO(spec)` occurrences.
|
||||
- Proposed decision entries (never written to `SPEC.md` or `docs/decisions.md` by this agent) or `TODO(spec)` occurrences.
|
||||
- Contract requests, open questions, spec gaps (with section numbers).
|
||||
|
||||
## 11. Numbering
|
||||
|
||||
Reference in New Issue
Block a user