Skip to content

docs(architecture): describe the whole command surface, not two thirds of it - #606

Merged
EVWorth merged 1 commit into
mainfrom
docs/architecture-command-surface
Sep 10, 2026
Merged

EVWorth merged 1 commit into
mainfrom
docs/architecture-command-surface

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Closes #457.

§5 declared the Tauri commands but omitted 32 of the 63 registered, so a reader couldn't tell whether a command existed by looking. #582 fixed the other direction — commands documented but never written — and this is the half that was left.

Added: the two connection commands, kill_query and get_own_thread_ids, the four view/DDL commands, the four AI commands that exist, and three sections that had nowhere to live at all — history (§5.6), SQLite (§5.7), platform (§5.8).

Each entry says why the command is shaped as it is rather than restating the signature — the signature is generated into bindings.ts and doesn't need a second copy that can drift.

The check script couldn't see its own blind spot

check-documented-commands.sh only matched async fn, so a documented sync command was invisible to it. Widening the pattern immediately turned up format_sql: documented, never implemented, and undetectable by the tool written to catch exactly that.

It's now marked NOT IMPLEMENTED and not planned — formatting belongs to the frontend via sql-formatter, and a round trip to Rust to reformat text as the user types would buy nothing.

Widening the pattern also broke name extraction, because a one-line signature ends in its return type rather than the function name. Fixed, and verified the check still fails on a reintroduced break (a renamed sync command) before trusting the pass.

Verification

check-documented-commands.sh passes with 0 undocumented and 11 explicitly marked as planned. dprint clean.

…s of it

Section 5 declared the Tauri commands but omitted 32 of the 63 registered,
so a reader could not tell whether a command existed by looking. #582 fixed
the other direction — commands documented but never written — and this is
the half that was left (#457).

Added: the two connection commands, kill_query and get_own_thread_ids, the
four view and DDL commands, the four AI commands that exist, and three
sections that had no place to live at all — history (§5.6), SQLite (§5.7)
and platform (§5.8). Each says why the command is shaped as it is rather
than restating its signature, since the signature is generated into
bindings.ts and does not need a second copy.

The check script only matched `async fn`, so a documented *sync* command
was invisible to it. Widening the pattern immediately found `format_sql` —
documented, never implemented, and undetectable by the tool written to
catch exactly that. It is now marked NOT IMPLEMENTED and not planned:
formatting is the frontend's, via the sql-formatter npm package, and a
round trip to Rust to reformat text as the user types would buy nothing.

Widening it also broke the name extraction, because a one-line signature
ends in its return type rather than the function name. Fixed, and verified
the check still fails on a reintroduced break before trusting the pass.

Closes #457

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth merged commit a52dd0f into main Sep 10, 2026
12 checks passed
@EVWorth
EVWorth deleted the docs/architecture-command-surface branch September 10, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1][arch] Single execute_query IPC entry point — ARCHITECTURE §5 declares 35 commands, 13 unimplemented + 22 undocumented in §5

1 participant