Summary
Add the first document-first v2 workflow: importing an explicit file through bb documents import without bank-specific parsing or inference.
Scope
- Add a
bb documents import --file FILE command.
- Add
--dry-run planning that reports hash, size, media type, and canonical object key without writing database rows or copying files.
- On real import, hash the file, create or reuse a
BB_DOCUMENT row, copy the source file into financial/canonical, and create a BB_DOCUMENT_OBJECT row.
- Keep canonical objects addressed by SHA-256 object keys, not source filenames.
- Make duplicate imports idempotent by file hash/object key.
- Keep parser detection, inference, views, and document inbox processing out of scope.
Acceptance criteria
uv run bb documents import --dry-run --file sample.pdf reports a plan and makes no changes.
uv run bb documents import --file sample.pdf records the document and copies a canonical object.
- Re-importing the same file is safe and reports the existing document/object rather than creating duplicates.
bb status and existing legacy commands continue to work.
- Validation passes.
Follows #130.
Summary
Add the first document-first v2 workflow: importing an explicit file through
bb documents importwithout bank-specific parsing or inference.Scope
bb documents import --file FILEcommand.--dry-runplanning that reports hash, size, media type, and canonical object key without writing database rows or copying files.BB_DOCUMENTrow, copy the source file intofinancial/canonical, and create aBB_DOCUMENT_OBJECTrow.Acceptance criteria
uv run bb documents import --dry-run --file sample.pdfreports a plan and makes no changes.uv run bb documents import --file sample.pdfrecords the document and copies a canonical object.bb statusand existing legacy commands continue to work.Follows #130.