Development
Development Guidelines
Section titled “Development Guidelines”Local Checks
Section titled “Local Checks”Run the Go test suite before pushing code changes:
go test ./...Build a local binary without VCS stamping when working from a git worktree:
go build -buildvcs=false -o ./.miu-db/miudb ./cmd/miudb./.miu-db/miudb version --output jsonValidate the Neovim plugin Lua files after editing ui/miu-db.nvim:
luac -p ui/miu-db.nvim/lua/miu_db/*.lua ui/miu-db.nvim/plugin/miu_db.luaCode Boundaries
Section titled “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
Section titled “Secrets”Output Contract
Section titled “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.