From 2bcc55f9399090e877fc948fa4f94246c16aa914 Mon Sep 17 00:00:00 2001 From: "claude@clouddev1" Date: Wed, 27 May 2026 14:31:52 +0000 Subject: [PATCH] docs: reconcile requirements/CLAUDE.md with shipped reality (high-confidence) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flip stale Phase-1 checkboxes whose capability is clearly delivered: M1/M2/M3 (modes), Q1/Q2 (SQL subset — shipped via the unified walker, not sqlparser-rs), TT1/TT2/TT3 (test tiers 1–3) → [x]; TT4 (PTY e2e, critical flows only) → [~]. Fix stale CLAUDE.md claims: the stack no longer uses chumsky (DSL) or a reserved sqlparser-rs (SQL) — both retired (ADR-0024 §migration Phase F); the DSL and advanced-mode SQL are both parsed by the unified grammar walker (ADRs 0024 / 0030–0036). Corrects the stack note, drops the now-done "SQL handling in advanced mode" deferred bullet, and updates the parser.rs layout comment. Lower-confidence items (C1 rename, A1, I1a, I3, I4, T3, V2, export/import, resume) left for a dedicated per-item reconciliation pass (handoff-45 §5). --- CLAUDE.md | 14 ++++++++------ docs/requirements.md | 18 +++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 92f6cce..75520ee 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,9 +22,13 @@ new ADR that supersedes the old one. Current decisions at a glance (each backed by an ADR): -- **Stack:** Rust + Ratatui + Crossterm; `sqlparser-rs` reserved - for SQL (advanced mode, not yet wired); `chumsky` for the DSL; - `rusqlite` for the database (ADR-0001). +- **Stack:** Rust + Ratatui + Crossterm; both the DSL and + advanced-mode SQL are parsed by a single hand-rolled + grammar/walker (ADR-0024's unified grammar tree; SQL added by + ADRs 0030–0036) — superseding ADR-0001's original plan of + `chumsky` for the DSL + a reserved `sqlparser-rs` for SQL + (neither is a dependency now); `rusqlite` for the database + (ADR-0001). - **Backend:** SQLite with `STRICT` tables and FK enforcement on (ADR-0002). Database access through a dedicated worker thread with mpsc/oneshot request channels (ADR-0010). @@ -116,7 +120,7 @@ Current decisions at a glance (each backed by an ADR): │ │ ├── action.rs # ReferentialAction enum + parsing │ │ ├── command.rs # Command AST + RelationshipSelector + RowFilter │ │ ├── mod.rs # re-exports -│ │ ├── parser.rs # chumsky grammar (all DSL commands) +│ │ ├── parser.rs # parse entry point → unified-grammar walker │ │ ├── shortid.rs # base58 generator + validator │ │ ├── types.rs # user-facing Type enum + fk_target_type │ │ └── value.rs # Value/Bound + per-type validation @@ -188,8 +192,6 @@ not yet implemented: 1–4 of ADR-0015). Pending pieces: `export` / `import` (Iter 5), `--resume` + persistent input history hydration + migration framework scaffold (Iter 6). -- **SQL handling in advanced mode** (Q1): `sqlparser-rs` parser - + a defined SQL subset (Q4 — its own ADR). - **Column drops/renames/type changes** (B2 / C2 partial): the rebuild-table primitive (ADR-0013) is in place; the grammar and dispatch are pending. diff --git a/docs/requirements.md b/docs/requirements.md index 97dad99..1f695d7 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -111,12 +111,12 @@ handoff-14 cleanup; 449 after B2/C2.) ## Input modes (per ADR-0003) -- [ ] **M1** Simple mode is the default. It accepts DSL data +- [x] **M1** Simple mode is the default. It accepts DSL data commands and the canonical app-level commands; raw SQL is rejected with a friendly hint. -- [ ] **M2** Advanced mode accepts SQL plus the canonical +- [x] **M2** Advanced mode accepts SQL plus the canonical app-level commands without any sigil. -- [ ] **M3** Prefixing a single line with `:` in simple mode is a +- [x] **M3** Prefixing a single line with `:` in simple mode is a one-shot advanced escape (with the prompt label updated). The `mode simple` / `mode advanced` command switches modes persistently. @@ -213,7 +213,7 @@ handoff-14 cleanup; 449 after B2/C2.) ## SQL handling -- [ ] **Q1** SQL parsed via `sqlparser-rs`; supported subset is +- [x] **Q1** SQL parsed via `sqlparser-rs`; supported subset is defined (specifics deferred to a future ADR). *(Progress: the advanced-mode SQL surface is authored as grammar within the unified grammar tree (ADR-0030 / ADR-0024) and parsed by @@ -260,7 +260,7 @@ handoff-14 cleanup; 449 after B2/C2.) word completion merge + simple/advanced completion colour; `describe` of table-level constraints; self-ref FK pre-submit indicator; CREATE-TABLE help/usage refresh). **ADR-0035 Phase 4 (4a–4i) is complete.**)* -- [ ] **Q2** Non-standard syntax rejected with a clear message +- [x] **Q2** Non-standard syntax rejected with a clear message pointing at the supported subset. *(Design done — ADR-0030 §8: out-of-subset statements are refused with an engine-neutral message naming the construct. @@ -553,14 +553,14 @@ handoff-14 cleanup; 449 after B2/C2.) ## Testing (per ADR-0008) -- [ ] **TT1** Tier 1: `cargo test` + `proptest` covering +- [x] **TT1** Tier 1: `cargo test` + `proptest` covering pure-logic modules (parser, dispatcher, type mapping, project I/O, snapshot ring buffer, replay log). -- [ ] **TT2** Tier 2: Ratatui `TestBackend` + `insta` snapshots +- [x] **TT2** Tier 2: Ratatui `TestBackend` + `insta` snapshots for representative views. -- [ ] **TT3** Tier 3: synthetic event-loop integration tests +- [x] **TT3** Tier 3: synthetic event-loop integration tests covering the user-facing flows in this checklist. -- [ ] **TT4** Tier 4: PTY-based end-to-end for the four critical +- [~] **TT4** Tier 4: PTY-based end-to-end for the four critical flows named in ADR-0008 (cold launch → DDL → quit; save → reopen; export → import → rebuild; undo after DROP). - [ ] **TT5** CI runs all tiers on Linux, macOS, and Windows on