Development Guidelines¶
Local Checks¶
Run the Go test suite before pushing code changes:
Build a local binary without VCS stamping when working from a git worktree:
Validate the Neovim plugin Lua files after editing ui/miu-db.nvim:
Code Boundaries¶
cmd/miudbonly wires the CLI entry point.internal/cliowns command definitions, output envelopes, and exit behavior.internal/configowns native config, secret refs, redaction, and migration compatibility.internal/adapterandinternal/adapters/*own database-specific behavior.internal/tunnelowns SSH tunnel setup.internal/query,internal/result, andinternal/schemaown execution, pagination, and inspection.ui/miu-db.nvimis a client and should not import adapter internals.
Secrets¶
Never log or serialize raw credentials. Use the redaction helpers in
internal/config for CLI errors, connection output, and diagnostics. New
connections should store sensitive fields through SecretRef providers instead
of writing passwords inline.
Output Contract¶
Agent-facing commands should keep data on stdout and diagnostics on stderr.
JSON output should keep the envelope shape documented in
CLI Contract, including stable kind, command,
request_id, summary, data, warnings, and structured errors.