Skip to content

docs: describe the native DuckDB database in the architecture and agent guidance #2196

Closed

Description

@shm11C3

Outcome

The documents a contributor or an AI agent reads first describe how persistence actually works once the native DuckDB database can be authoritative, instead of describing SQLite as the only store.

Related to #2090. Should land with, or immediately before, production enablement (#2137), not earlier: until then SQLite-only is still what ships.

What is out of date (verified on develop)

  • AGENTS.md: the "Current Hardware Data Flow" diagram ends in OS APIs / vendor APIs / SQLite, the persistence paragraph says App supplies the migration set and Core owns "the pool", and "Evidence And Scope" tells the reader to inspect SQLite data for runtime and persistence claims.
  • docs/architecture/backend.md: the layer diagram and the persistence section describe only the SQLite path (App resolves the SQLite path, Core runs migrations against its pool) and still frame the archive direction as a proposal.
  • Owner READMEs (core/README.md, src-tauri/README.md) where they describe database ownership.

Scope

  • Describe the dispatch boundary as the one place every database consumer goes through, what decides which engine answers (the durable selection record), and the single-owner rule for the native file.
  • Describe App's side: path resolution for the source, native file and marker; the lifecycle owner and its five states; the conversion driver; SQLite retirement; the checkpoint after the expiry pass.
  • Update the evidence guidance: how to inspect a native database for a persistence claim (read-only DuckDB connection, never beside the application's live owner) alongside the existing SQLite guidance.
  • Keep instructions short and link to the Design Doc, ADR 0022 and ADR 0025 rather than copying them. Do not copy file trees into AI instructions. Update docs/README.md only if a new discoverable document is added.
  • Run npm run check:agent-guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docstype:docs

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions