Project storage runtime: ADR-0015 + ADR-0004/0007 amendments

Designs track-2 lifecycle and persistence end-to-end: per-command
write-through to db+yaml+csv+history.log gated by the combined db
persistence logic with commit-db-last ordering; existence-only load
with explicit rebuild command; --resume CLI flag backed by
<data-root>/last_project; in-TUI list-with-browse picker; lock file
for single-instance enforcement; fatal-banner-then-quit failure
model (with --resume making restart cheap); fatal CSV row-load
errors with full diagnosis; YYYYMMDD-word-word-word temp naming
with display-name prettifier; collision-checked names for both
temp and user-supplied projects. Project name lives only on the
filesystem (not duplicated in YAML). ADR-0004 and ADR-0007 amended
in place. requirements.md and CLAUDE.md updated; OOS-6 (global
rolling history) tracked as deferred.
This commit is contained in:
claude@clouddev1
2026-05-07 19:53:47 +00:00
parent bfdf350ac8
commit 4fca862c6c
6 changed files with 663 additions and 17 deletions
+16 -6
View File
@@ -32,8 +32,17 @@ Current decisions at a glance (each backed by an ADR):
(SQL + app-level commands) on toggle; `:` one-shot escape from
simple to advanced (ADR-0003). No other sigils.
- **Project format:** `project.yaml` + `data/<table>.csv` +
`history.log`; `playground.db` is a derived artifact (ADR-0004).
*(Format defined; track 2 implementation pending.)*
`history.log`; `playground.db` is a derived artifact (ADR-0004,
amended by ADR-0015).
*(Format defined; runtime semantics defined in ADR-0015; track 2
implementation pending.)*
- **Project storage runtime:** every command persists through to
db + yaml + csv + history.log in one execution context, gated
by the combined db persistence logic; commit-db-last ordering
for crash-recoverable state; existence-only load + explicit
`rebuild` command; in-TUI list-with-browse load picker; lock
file for single-instance enforcement; persistence failures
are fatal (banner + quit) (ADR-0015).
- **Types:** `text`, `int`, `real`, `decimal`, `bool`, `date`,
`datetime`, `blob`, `serial`, `shortid`. Compound primary keys
supported. No real UUIDs (ADR-0005). FK column type
@@ -146,10 +155,11 @@ Key invariants in the code:
These are explicitly tracked (mostly in `requirements.md`) but
not yet implemented:
- **Project storage** (track 2 / P-series, F-series): file-
backed projects, save/load/new/export/import, persistent
history. Format is fully designed in ADR-0004; the
metadata-table round-trip lands here.
- **Project storage** (track 2 / P-series, F-series, P-NAME-*):
file-backed projects, save/load/new/rebuild/export/import,
persistent history, project-name display + prettifier. Format
is fully designed in ADR-0004 (with amendments) and runtime
semantics in ADR-0015; implementation is the next iteration.
- **Complex WHERE expressions** (C5a): AND/OR/comparison/LIKE
in UPDATE/DELETE/show-data filters. The bridge from DSL
fluency to real SQL.