Skip to content

Datastore backend for project metadata (alternative to .project/) #391

Description

@mlieberman85

Summary

Today darnit's project state (.project/project.yaml, maintainers.yaml, extensions) is filesystem-only. Fleet-scale operators and downstream consumers (a compliance dashboard, an attestation aggregator, a policy dispatcher) benefit from a datastore-backed alternative to the on-disk YAML tree.

Design conversation on 2026-08-23 landed on: darnit core stays filesystem-only; alternative storage backends land as plugins behind per-artifact Protocols (ProjectStateStore, AttestationStore, ReportStore, AuditCacheStore) with entry-point discovery, mirroring feature 027's QuestionResolver pattern. Backend selection lives in TOML.

Scope

  • Ship a datastore backend implementation that satisfies ProjectStateStore for project.yaml / maintainers.yaml / extensions. Deployed alongside darnit (likely under a new services/ subtree if the repo goes monorepo per the same 2026-08-23 conversation) so it is not a hard darnit runtime dependency.
  • Datastore choice deferred to spec time (Postgres, SQLite for local test, or a small KV -- decision belongs in the spec's research.md).
  • Read/write semantics MUST be documented explicitly: sync vs async, transactional vs eventually-consistent, and what a "failed write" means to the calling audit.

Dependencies

  • Blocker: the storage-abstraction feature (per-artifact Protocols + entry-point discovery) must land first as a separate feature. This issue is the FIRST non-filesystem backend that consumes that abstraction; without the abstraction, this work has nowhere to plug in.

Non-goals for v0

  • Migrating attestations, reports, or audit-cache to the same backend (each is its own Protocol; do them one at a time).
  • Multi-tenant / access-controlled datastore semantics (kick off as single-tenant; add tenancy in a follow-up).
  • A migration tool from .project/ YAML to the datastore (write path first; migration can follow).

Constitution alignment

  • I. Plugin Separation: the datastore backend is a plugin package; darnit core does not import it.
  • III. TOML-First: backend selection lives in .baseline.toml ([stores.project] backend = \"...\"); no Python-code escape hatch.
  • Storage claim in CLAUDE.md: unchanged. Core stays filesystem-only.

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions