You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .flow/tasks/fn-40-structured-query-document-syntax.1.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,17 @@ Design and implement first-class multi-line structured query documents using exi
20
20
21
21
## Done summary
22
22
23
-
TBD
23
+
Implemented first-class structured multi-line query documents using GNO naming only: `term`, `intent`, and `hyde`. Added a shared parser/normalizer, rolled it through CLI `query`/`ask`, REST `query`/`ask`, MCP `gno_query`, SDK `query`/`ask`, and Web Search/Ask text boxes, then added parser/CLI/API/SDK coverage plus full docs/website updates including a dedicated syntax reference page.
24
+
25
+
Key decisions:
26
+
27
+
- structured syntax only activates for multi-line query input, so single-line queries remain unchanged
28
+
- plain untyped lines become the base query; if absent, GNO derives the base query from `term:` lines first, then `intent:` lines
29
+
-`hyde:` is never searched directly and hyde-only documents are rejected
30
+
- explicit `queryModes` and document-derived modes merge, with shared validation across the combined set
24
31
25
32
## Evidence
26
33
27
34
- Commits:
28
-
- Tests:
35
+
- Tests: bun run lint:check, bun test, bun run docs:verify, cd website && mise x -- make build, bun test test/core/structured-query.test.ts test/serve/routes/query.test.ts test/sdk/client.test.ts test/cli/structured-query-document.test.ts --timeout 60000
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Added
11
11
12
+
## [0.24.0] - 2026-03-10
13
+
14
+
### Added
15
+
16
+
- First-class structured multi-line query documents using `term:`, `intent:`, and `hyde:` across CLI `query`/`ask`, REST `/api/query` and `/api/ask`, MCP `gno_query`, SDK `query`/`ask`, and Web Search/Ask text boxes.
17
+
- Dedicated structured syntax reference doc plus updated CLI/API/MCP/SDK/Web docs.
--query-mode hyde:"Refresh tokens rotate on each use and previous tokens are revoked." \
290
296
--explain
297
+
298
+
# Multi-line structured query document
299
+
gno query $'auth flow\nterm: "refresh token" -oauth1\nintent: how refresh token rotation works\nhyde: Refresh tokens rotate on each use and previous tokens are revoked.' --fast
--query-mode hyde:"Refresh tokens rotate on each use and previous tokens are revoked."
172
+
173
+
# Multi-line structured query document
174
+
gno query $'auth flow\nterm: "refresh token" -oauth1\nintent: how refresh token rotation works\nhyde: Refresh tokens rotate on each use and previous tokens are revoked.'
gno ask $'term: web performance budgets\nintent: latency and vitals' --no-answer
197
203
```
198
204
199
205
**Full-document context**: When `--answer` is used, GNO passes complete document content to the generation model, not truncated snippets. This ensures the LLM sees tables, code examples, and full context needed for accurate answers.
@@ -209,6 +215,7 @@ Options:
209
215
-`--intent <text>` - Disambiguating context for ambiguous questions without searching on that text
210
216
-`--exclude <values>` - Hard-prune docs containing any comma-separated term in title/path/body
Copy file name to clipboardExpand all lines: docs/MCP.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -578,6 +578,7 @@ Optional steering controls:
578
578
-`intent` is complementary to `queryModes`: use intent for background context, `queryModes` for caller-supplied lexical/semantic expansions.
579
579
-`queryModes` is optional and only needed when your client wants explicit retrieval intent control.
580
580
- If `queryModes` is set, generated expansion is skipped for that query and the provided entries are used directly.
581
+
- The `query` string itself may also be a multi-line structured query document using `term:`, `intent:`, and `hyde:` lines. See [Structured Query Syntax](./SYNTAX.md).
Copy file name to clipboardExpand all lines: docs/WEB-UI.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,15 @@ Choose retrieval mode:
81
81
82
82
Click **Ask** for AI-powered answers. Use **Advanced Retrieval** to scope by collection/date/category/author/tags and add optional `intent` / candidate-limit / exclude / query-mode controls for ambiguous questions.
83
83
84
+
Both **Search** and **Ask** accept multi-line structured query documents. Press `Shift+Enter` to add a new line, then use:
85
+
86
+
```text
87
+
auth flow
88
+
term: "refresh token"
89
+
intent: token rotation
90
+
hyde: Refresh tokens rotate on each use.
91
+
```
92
+
84
93
> **Note**: Models auto-download on first use. Cold start can take longer on first launch while local models download. For instant startup, set `GNO_NO_AUTO_DOWNLOAD=1` and download explicitly with `gno models pull`.
0 commit comments