@carllee1983/dbcli 1.51.0 → 1.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcli-agent",
3
- "version": "1.51.0",
3
+ "version": "1.51.1",
4
4
  "description": "Database CLI skill and command reference for AI agents.",
5
5
  "contextFileName": "AGENTS.md"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carllee1983/dbcli",
3
- "version": "1.51.0",
3
+ "version": "1.51.1",
4
4
  "description": "Database CLI for AI agents",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbcli-agent",
3
- "version": "1.51.0",
3
+ "version": "1.51.1",
4
4
  "description": "Database CLI skill and command reference for AI agents",
5
5
  "author": {
6
6
  "name": "Carl Lee",
@@ -82,6 +82,16 @@ warnings) go to stderr so stdout stays parseable — when piping JSON into a par
82
82
  use `2>/dev/null` or leave stderr alone. **Never `2>&1`**: it merges those lines back
83
83
  into stdout and the parse fails.
84
84
 
85
+ **Business-language discovery:** When a user uses a business alias, metric, recurring
86
+ term, or relationship/join intent instead of a physical table or field name, first run
87
+ `dbcli skill context --format json`. If it includes `semantic`, treat that reviewed
88
+ section as the governed vocabulary; use `dbcli semantic search <terms> --format json`
89
+ to look up a specific term. If no semantic section exists or search returns no result,
90
+ fall back to `blacklist` → `schema` mapping and tell the user that optional
91
+ `dbcli.semantic.json` can make future requests consistent. Never create, update, or
92
+ migrate that file without an explicit human request; semantic vocabulary never replaces
93
+ schema confirmation or the normal query/write safety gates.
94
+
85
95
  ## Agent Task Packs
86
96
 
87
97
  When the user asks for a database workflow ("diagnose this slow query", "audit
@@ -552,7 +562,7 @@ schema. Raw `query` / `export` invocations render a sortable table only.
552
562
  - **Health / growth:** `check --all` (huge tables skipped unless `--include-large`); consult schema `sizeCategory` before ad-hoc queries.
553
563
  - **Codegen from live DB:** `schema --format json` to drive an ORM; cross-check once with `dbcli query`.
554
564
  - **Integration truth:** `query` before → run app → `query` after. Unit-test mocks are not a substitute.
555
- - **Natural language requests** (e.g. "update order to shipped"): pick `query` vs DML, map terms → columns via `schema` (and enum values in data), respect blacklist and `sizeCategory`, **always `--dry-run` writes first**.
565
+ - **Natural language requests** (e.g. "update order to shipped"): follow **Business-language discovery** first when the request uses business terminology; then pick `query` vs DML, map terms → columns via `schema` (and enum values in data), respect blacklist and `sizeCategory`, **always `--dry-run` writes first**.
556
566
 
557
567
  ## Notes
558
568
 
@@ -2197,6 +2197,14 @@ project root. It supplies business names and descriptions to an agent, but is
2197
2197
  not a query language: these commands are offline, read-only, and never execute
2198
2198
  SQL or contact an LLM.
2199
2199
 
2200
+ When an agent receives a business term, metric, alias, or relationship/join intent,
2201
+ it should first inspect `dbcli skill context --format json`. If that output includes
2202
+ `semantic`, use the reviewed vocabulary and use `semantic search <terms>` for a
2203
+ specific lookup. When the section is absent or search has no result, fall back to the
2204
+ blacklist-filtered schema and tell the user that `dbcli.semantic.json` is an optional
2205
+ way to make future terminology consistent. Do not create, update, or migrate the file
2206
+ without an explicit human request.
2207
+
2200
2208
  ```bash
2201
2209
  dbcli semantic validate
2202
2210
  dbcli semantic validate --format json
@@ -82,6 +82,16 @@ warnings) go to stderr so stdout stays parseable — when piping JSON into a par
82
82
  use `2>/dev/null` or leave stderr alone. **Never `2>&1`**: it merges those lines back
83
83
  into stdout and the parse fails.
84
84
 
85
+ **Business-language discovery:** When a user uses a business alias, metric, recurring
86
+ term, or relationship/join intent instead of a physical table or field name, first run
87
+ `dbcli skill context --format json`. If it includes `semantic`, treat that reviewed
88
+ section as the governed vocabulary; use `dbcli semantic search <terms> --format json`
89
+ to look up a specific term. If no semantic section exists or search returns no result,
90
+ fall back to `blacklist` → `schema` mapping and tell the user that optional
91
+ `dbcli.semantic.json` can make future requests consistent. Never create, update, or
92
+ migrate that file without an explicit human request; semantic vocabulary never replaces
93
+ schema confirmation or the normal query/write safety gates.
94
+
85
95
  ## Agent Task Packs
86
96
 
87
97
  When the user asks for a database workflow ("diagnose this slow query", "audit
@@ -552,7 +562,7 @@ schema. Raw `query` / `export` invocations render a sortable table only.
552
562
  - **Health / growth:** `check --all` (huge tables skipped unless `--include-large`); consult schema `sizeCategory` before ad-hoc queries.
553
563
  - **Codegen from live DB:** `schema --format json` to drive an ORM; cross-check once with `dbcli query`.
554
564
  - **Integration truth:** `query` before → run app → `query` after. Unit-test mocks are not a substitute.
555
- - **Natural language requests** (e.g. "update order to shipped"): pick `query` vs DML, map terms → columns via `schema` (and enum values in data), respect blacklist and `sizeCategory`, **always `--dry-run` writes first**.
565
+ - **Natural language requests** (e.g. "update order to shipped"): follow **Business-language discovery** first when the request uses business terminology; then pick `query` vs DML, map terms → columns via `schema` (and enum values in data), respect blacklist and `sizeCategory`, **always `--dry-run` writes first**.
556
566
 
557
567
  ## Notes
558
568
 
@@ -2197,6 +2197,14 @@ project root. It supplies business names and descriptions to an agent, but is
2197
2197
  not a query language: these commands are offline, read-only, and never execute
2198
2198
  SQL or contact an LLM.
2199
2199
 
2200
+ When an agent receives a business term, metric, alias, or relationship/join intent,
2201
+ it should first inspect `dbcli skill context --format json`. If that output includes
2202
+ `semantic`, use the reviewed vocabulary and use `semantic search <terms>` for a
2203
+ specific lookup. When the section is absent or search has no result, fall back to the
2204
+ blacklist-filtered schema and tell the user that `dbcli.semantic.json` is an optional
2205
+ way to make future terminology consistent. Do not create, update, or migrate the file
2206
+ without an explicit human request.
2207
+
2200
2208
  ```bash
2201
2209
  dbcli semantic validate
2202
2210
  dbcli semantic validate --format json