claude@clouddev1 6845df1475 ADR-0022 stage 6/8: IdentSlot taxonomy + parser audit
New `dsl::ident_slot` module: IdentSlot enum with four
variants — NewName (user invents), TableName (existing),
Column (existing), RelationshipName (existing). Plus
`completes_from_schema()` accessor for the completion
engine in stage 8.

Deliberate v1 simplification vs. ADR-0022 §8: no TableRef
binding for Column. The completion engine in stage 8 will
either union all columns or determine the table from the
consumed prefix heuristically. The TableRef wrinkle returns
if/when stage 8 needs it.

Parser audit: renamed bare `ident()` → `ident_inner()`
(now private-by-convention) and introduced `ident_ctx(slot)`
wrapper. Every command parser combinator was audited and
each `ident()` call site replaced with the appropriate
`ident_ctx(IdentSlot::…)`:

  - create_table table-name → NewName
  - drop_table → TableName
  - add_column → TableName + NewName
  - drop_column → TableName + Column
  - rename_column → TableName + Column + NewName
  - change_column → TableName + Column
  - show_data / show_table → TableName
  - insert column-list → Column; insert table → TableName
  - update set-LHS → Column; update target → TableName
  - delete target → TableName
  - where-clause LHS → Column
  - relationship `as <name>` → NewName
  - drop relationship by name → RelationshipName
  - qualified_column → TableName + Column
  - with_pk_clause spec name → NewName

The slot tag is currently documentation-only — the wrapper
ignores it and returns ident_inner() unchanged. The
audit's value is ensuring every call site has explicit
intent recorded co-located with the parser combinator. The
completion engine in stage 8 will start consuming the slots
either by re-parsing with awareness or by an explicit
parser-side propagation refactor.

Tests: 700 passing, 0 failing, 1 ignored (698 baseline →
+2 IdentSlot enum tests). Clippy clean.

Stage 7 plumbs schema queries through the worker thread
(ListNamesFor) so stage 8's completion engine has data.
2026-05-10 17:47:02 +00:00
2026-05-07 11:17:58 +00:00
S
Description
No description provided
15 MiB
v0.1.0 Latest
2026-06-15 17:57:18 +01:00
Languages
Rust 97.4%
MDX 1.3%
JavaScript 0.8%
Astro 0.2%
CSS 0.1%
Other 0.1%