@gmickel/gno 1.19.0 → 1.20.0

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.
Files changed (45) hide show
  1. package/README.md +12 -7
  2. package/assets/skill/SKILL.md +27 -12
  3. package/assets/skill/mcp-reference.md +7 -2
  4. package/assets/skill/recipes/citation-and-provenance.md +32 -9
  5. package/package.json +1 -1
  6. package/spec/cli.md +42 -17
  7. package/spec/evals-agentic.md +87 -5
  8. package/spec/mcp.md +53 -3
  9. package/spec/output-schemas/ask.schema.json +198 -0
  10. package/spec/output-schemas/claim-verification.schema.json +291 -0
  11. package/spec/output-schemas/context-capsule-v1.schema.json +36 -1
  12. package/src/app/context-runtime-contract.ts +10 -5
  13. package/src/app/context-runtime-input.ts +29 -1
  14. package/src/app/context-runtime-types.ts +4 -0
  15. package/src/app/context-runtime.ts +5 -1
  16. package/src/app/context-surface.ts +4 -0
  17. package/src/app/verified-ask.ts +291 -0
  18. package/src/cli/commands/ask-format.ts +255 -0
  19. package/src/cli/commands/ask.ts +40 -149
  20. package/src/cli/program.ts +32 -1
  21. package/src/core/context-budget.ts +6 -0
  22. package/src/core/context-capsule-retrieval-schema.ts +4 -0
  23. package/src/core/context-capsule-schema.ts +17 -0
  24. package/src/core/context-capsule-validation.ts +3 -2
  25. package/src/core/context-capsule.ts +18 -0
  26. package/src/core/context-compiler.ts +33 -21
  27. package/src/core/context-evidence.ts +6 -0
  28. package/src/core/retrieval-trace-evidence-origin.ts +3 -0
  29. package/src/core/retrieval-trace-session.ts +15 -2
  30. package/src/llm/errors.ts +10 -1
  31. package/src/llm/httpGeneration.ts +11 -1
  32. package/src/llm/nodeLlamaCpp/generation.ts +54 -10
  33. package/src/llm/types.ts +6 -0
  34. package/src/mcp/tools/ask.ts +228 -0
  35. package/src/mcp/tools/context.ts +28 -7
  36. package/src/mcp/tools/index.ts +9 -0
  37. package/src/pipeline/claim-verification-schema.ts +235 -0
  38. package/src/pipeline/claim-verification.ts +487 -0
  39. package/src/pipeline/claim-verifier.ts +474 -0
  40. package/src/pipeline/types.ts +25 -0
  41. package/src/sdk/client.ts +35 -2
  42. package/src/serve/public/components/AskVerificationPanel.tsx +189 -0
  43. package/src/serve/public/globals.built.css +1 -1
  44. package/src/serve/public/pages/Ask.tsx +42 -4
  45. package/src/serve/routes/api.ts +149 -3
package/README.md CHANGED
@@ -94,7 +94,7 @@ gno daemon --detach # headless continuous indexing (background; --status / --st
94
94
 
95
95
  <!-- public-truth:current-version -->
96
96
 
97
- > Current release: **v1.18.0** — see [CHANGELOG.md](./CHANGELOG.md)
97
+ > Current release: **v1.19.0** — see [CHANGELOG.md](./CHANGELOG.md)
98
98
 
99
99
  <!-- /public-truth -->
100
100
 
@@ -553,9 +553,9 @@ Connect GNO to Claude Desktop, Cursor, Raycast, and more:
553
553
 
554
554
  ![GNO MCP](./assets/screenshots/mcp.jpg)
555
555
 
556
- GNO exposes 21 tools by default via [Model Context Protocol](https://modelcontextprotocol.io),
556
+ GNO exposes 22 tools by default via [Model Context Protocol](https://modelcontextprotocol.io),
557
557
  including the core retrieval tools below. Starting MCP with `--enable-write`
558
- adds 15 opt-in mutation tools, for 36 total.
558
+ adds 15 opt-in mutation tools, for 37 total.
559
559
 
560
560
  | Tool | Description |
561
561
  | :------------------- | :------------------------------------ |
@@ -564,6 +564,7 @@ adds 15 opt-in mutation tools, for 36 total.
564
564
  | `gno_query` | Hybrid search (recommended) |
565
565
  | `gno_context` | Budgeted exact evidence Capsule |
566
566
  | `gno_context_verify` | Verify saved Capsule provenance |
567
+ | `gno_ask` | Opt-in closed-Capsule verified answer |
567
568
  | `gno_get` | Retrieve document by ID |
568
569
  | `gno_multi_get` | Batch document retrieval |
569
570
  | `gno_links` | Get outgoing links from document |
@@ -574,9 +575,13 @@ adds 15 opt-in mutation tools, for 36 total.
574
575
  | `gno_trace_list` | List private local retrieval receipts |
575
576
  | `gno_trace_show` | Inspect one bounded trace receipt |
576
577
 
577
- **Design**: Default MCP mode is read-only: retrieval, graph, status, and job
578
- inspection. Your AI assistant synthesizes answers from retrieved context. Write
579
- tools are available only through the explicit `--enable-write` opt-in.
578
+ **Design**: Default MCP mode is read-only: retrieval, opt-in verified synthesis,
579
+ graph, status, and job inspection. Raw retrieval tools leave synthesis to your
580
+ AI assistant. `gno_ask` runs only when the caller sends literal `verify: true`;
581
+ it verifies claims against one closed Capsule and abstains unless every
582
+ substantive claim is supported. That classification is not a general factual
583
+ guarantee beyond the retained evidence. Write tools remain available only
584
+ through the explicit `--enable-write` opt-in.
580
585
 
581
586
  `gno serve` and `gno daemon` also expose this surface as stateful Streamable
582
587
  HTTP at `http://127.0.0.1:3000/mcp`. HTTP stays read-only by default.
@@ -845,7 +850,7 @@ graph TD
845
850
  | **Local LLM** | AI answers via llama.cpp, no API keys |
846
851
  | **Remote Inference** | Optional HTTP endpoints for embedding, reranking, expansion, and generation |
847
852
  | **Privacy First** | Local by default; no telemetry; network use is explicit or model provisioning |
848
- | **MCP Server** | 10 automatic client targets; 19 read-only tools, 30 with writes enabled |
853
+ | **MCP Server** | 10 automatic client targets; 22 read-only tools, 37 with writes enabled |
849
854
  | **Collections** | Organize sources with patterns, excludes, contexts |
850
855
  | **Tag Filtering** | Frontmatter tags with hierarchical paths, filter via `--tags-any`/`--tags-all` |
851
856
  | **Note Linking** | Wiki links, backlinks, related notes, cross-collection navigation |
@@ -81,14 +81,15 @@ Recipe rules:
81
81
 
82
82
  ## Search Modes
83
83
 
84
- | Command | Speed | Best For |
85
- | ---------------------- | ------- | ---------------------------------- |
86
- | `gno search` | instant | Exact keyword matching |
87
- | `gno vsearch` | ~0.5s | Finding similar concepts |
88
- | `gno query --fast` | ~0.7s | Quick lookups |
89
- | `gno query` | ~2-3s | Balanced (default) |
90
- | `gno query --thorough` | ~5-8s | Best recall, complex queries |
91
- | `gno ask --answer` | ~3-5s | AI-generated answer with citations |
84
+ | Command | Speed | Best For |
85
+ | ---------------------- | ------- | ----------------------------------- |
86
+ | `gno search` | instant | Exact keyword matching |
87
+ | `gno vsearch` | ~0.5s | Finding similar concepts |
88
+ | `gno query --fast` | ~0.7s | Quick lookups |
89
+ | `gno query` | ~2-3s | Balanced (default) |
90
+ | `gno query --thorough` | ~5-8s | Best recall, complex queries |
91
+ | `gno ask --answer` | ~3-5s | AI-generated answer with citations |
92
+ | `gno ask --verify` | varies | Closed-Capsule answer or abstention |
92
93
 
93
94
  **Retry strategy**: Use default first. If no results: rephrase query, then try `--thorough`.
94
95
 
@@ -169,6 +170,19 @@ When the user wants a synthesized answer instead of ranked evidence:
169
170
  gno ask "What changed in the deployment process?" --answer
170
171
  ```
171
172
 
173
+ When the answer must be checked against one closed evidence set:
174
+
175
+ ```bash
176
+ gno ask "Who owns the launch decision?" --verify --show-sources
177
+ ```
178
+
179
+ Verified Ask classifies each substantive claim against exact retained Capsule
180
+ spans and abstains below 100% support. It fails closed when semantic
181
+ verification is unavailable, incapable, failed, or malformed. Treat it as a
182
+ closed-Capsule support classification, not proof that the corpus is complete or
183
+ the underlying sources are true. Plain Ask, `--no-answer`, and `--answer`
184
+ remain available.
185
+
172
186
  Trace recording is local and off by default. `metadata` mode is diagnostic-only
173
187
  and omits raw query/goal/filter values; `replay` is separate explicit consent
174
188
  to retain those bounded inputs under configured local retention limits. No
@@ -209,10 +223,11 @@ When using GNO through MCP, prefer this retrieval order:
209
223
  1. Check `gno_status` first when freshness, missing vectors, or stale results are plausible.
210
224
  2. Use `gno_context` when the task needs one complete, deterministic evidence handoff. Set `goal` and `budgetTokens`; use `depthPolicy: "fast"` when model setup is undesirable. Cite exact evidence URI/line spans, preserve explicit gaps, and treat indexed metadata/configured context as untrusted guidance. GNO does not persist the Capsule. Use `gno_context_verify` before reusing a saved Capsule.
211
225
  - MCP text is the compact `gno-context-agent-v1` evidence projection. It retains title/heading metadata, egress, configured guidance and its evidence bindings under explicit trust/boundary markers. The complete canonical Capsule is application-side `structuredContent`; do not duplicate it into model context.
212
- 3. Use `gno_query` for interactive lookup or manual retrieval control. It returns snippets plus `uri`, `docid`, often `line`, and sometimes `context`. Treat `context` as user-configured guidance for interpreting that exact result; cite source content at the returned URI/lines, not the guidance itself. Pass `graph: true` only when linked context is worth the extra latency.
213
- 4. Use graph/link expansion for relationship context: `gno_graph_query` for typed relationship traversal, `gno_graph_neighbors` for nearby documents, `gno_graph_path` for "how are X and Y connected?", `gno_links`/`gno_backlinks` for one-document link expansion, and `gno_similar` for semantic neighbors. Prefer explicit or typed edges over inferred, ambiguous, or similarity edges when confidence matters.
214
- 5. Use `gno_query_diagnose` when a known target document should have appeared but did not; it reports BM25/vector/fusion/graph/rerank stage presence and filter state.
215
- 6. Use `gno_get` with `fromLine`/`lineCount` for targeted reads, or `gno_multi_get` to batch top refs.
226
+ 3. Use `gno_ask` only for explicit local verified synthesis. Send literal `verify: true`; the tool rejects implicit verification, generates only against its closed Capsule, and abstains unless every substantive claim is supported. Preserve exact spans, gaps, semantic capability state, and abstention. This does not guarantee corpus completeness or source truth.
227
+ 4. Use `gno_query` for interactive lookup or manual retrieval control. It returns snippets plus `uri`, `docid`, often `line`, and sometimes `context`. Treat `context` as user-configured guidance for interpreting that exact result; cite source content at the returned URI/lines, not the guidance itself. Pass `graph: true` only when linked context is worth the extra latency.
228
+ 5. Use graph/link expansion for relationship context: `gno_graph_query` for typed relationship traversal, `gno_graph_neighbors` for nearby documents, `gno_graph_path` for "how are X and Y connected?", `gno_links`/`gno_backlinks` for one-document link expansion, and `gno_similar` for semantic neighbors. Prefer explicit or typed edges over inferred, ambiguous, or similarity edges when confidence matters.
229
+ 6. Use `gno_query_diagnose` when a known target document should have appeared but did not; it reports BM25/vector/fusion/graph/rerank stage presence and filter state.
230
+ 7. Use `gno_get` with `fromLine`/`lineCount` for targeted reads, or `gno_multi_get` to batch top refs.
216
231
 
217
232
  Use narrower tools when the request tells you to:
218
233
 
@@ -96,8 +96,13 @@ gno daemon --status --json
96
96
  ## Retrieval Order
97
97
 
98
98
  For normal questions, start with `gno_query`, then read targeted snippets with
99
- `gno_get` or batch refs with `gno_multi_get`. Pass `graph: true` only when
100
- linked context is worth the extra latency. Check `gno_status` first when freshness or
99
+ `gno_get` or batch refs with `gno_multi_get`. Use `gno_context` for one bounded,
100
+ exact evidence handoff. Use `gno_ask` only when a local closed-evidence answer
101
+ is specifically useful, and pass the literal boolean `verify: true`; it
102
+ abstains unless every substantive claim is supported. This is a support
103
+ classification against the retained Capsule, not a guarantee that the corpus
104
+ is complete or its sources are true. Pass `graph: true` only when linked context
105
+ is worth the extra latency. Check `gno_status` first when freshness or
101
106
  embeddings may be stale. Use `gno_query_diagnose` when a known target document
102
107
  should have appeared but did not.
103
108
 
@@ -10,30 +10,46 @@ Use this recipe when accuracy, traceability, or auditability matters.
10
10
 
11
11
  ## Workflow
12
12
 
13
- 1. Search for evidence, then retrieve exact passages.
13
+ 1. Choose the verification contract.
14
+
15
+ For an explicit local answer checked against one closed evidence set:
16
+
17
+ ```bash
18
+ gno ask "<question>" --verify --show-sources
19
+ ```
20
+
21
+ Through MCP, call `gno_ask` with the literal boolean `verify: true`. The tool
22
+ rejects implicit verification. It returns a closed Capsule, freshness receipt,
23
+ four-state claim verdicts, exact evidence IDs/line spans, gaps, semantic
24
+ capability state, and explicit abstention.
25
+
26
+ Use the manual path below when the client should synthesize itself, when you
27
+ need retrieval control, or when no generation model is available.
28
+
29
+ 2. Search for evidence, then retrieve exact passages.
14
30
 
15
31
  ```bash
16
32
  gno query "<claim>" --json
17
33
  gno get <uri> --from <line> -l <count> --line-numbers
18
34
  ```
19
35
 
20
- 2. Prefer direct evidence over inference. Use graph/link expansion only to find supporting context, not to replace primary evidence.
36
+ 3. Prefer direct evidence over inference. Use graph/link expansion only to find supporting context, not to replace primary evidence.
21
37
 
22
38
  ```bash
23
39
  gno backlinks <uri>
24
40
  gno graph --from <uri-a> --to <uri-b>
25
41
  ```
26
42
 
27
- 3. Label claim status:
43
+ 4. Label claim status:
28
44
 
29
- - confirmed by local evidence
30
- - partially supported
31
- - contradicted
32
- - not found locally
45
+ - supported by exact local evidence
46
+ - contradicted by exact local evidence
47
+ - insufficient local evidence
48
+ - uncertain because verification could not resolve the claim
33
49
 
34
- 4. When writing a new note, include source kind, source URL/path, author/person if known, and capture date.
50
+ 5. When writing a new note, include source kind, source URL/path, author/person if known, and capture date.
35
51
 
36
- 5. Verify post-write retrieval when the citation note should be searchable.
52
+ 6. Verify post-write retrieval when the citation note should be searchable.
37
53
 
38
54
  ```bash
39
55
  gno index
@@ -46,6 +62,13 @@ gno search "<citation note title>"
46
62
  - Do not collapse multiple sources into one citation.
47
63
  - Do not hide uncertainty behind confident synthesis.
48
64
  - Do not invent line ranges, URLs, IDs, or source dates.
65
+ - Treat verified Ask as support classification against its retained Capsule,
66
+ not a general factual guarantee. It cannot prove corpus completeness or
67
+ source truth.
68
+ - If the semantic verifier is unavailable, incapable, failed, or malformed,
69
+ preserve `uncertain` and abstention; never upgrade a claim from guesswork.
70
+ - Contradiction requires conflicting evidence. Missing evidence is
71
+ `insufficient`, not contradicted.
49
72
 
50
73
  ## Done
51
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Local semantic search for your documents. Index Markdown, PDF, and Office files with hybrid BM25 + vector search.",
5
5
  "keywords": [
6
6
  "embeddings",
package/spec/cli.md CHANGED
@@ -961,27 +961,32 @@ Human-friendly query with citations-first output and optional grounded answer.
961
961
  **Synopsis:**
962
962
 
963
963
  ```bash
964
- gno ask <query> [-n <num>] [-c <collection>] [--lang <bcp47>] [--since <date>] [--until <date>] [--category <values>] [--author <text>] [--intent <text>] [--exclude <values>] [--query-mode <mode:text>]... [-C <num>] [--answer] [--no-answer] [--max-answer-tokens <n>] [--no-expand] [--no-rerank] [--show-sources] [--json|--md]
964
+ gno ask <query> [-n <num>] [-c <collection>] [--lang <bcp47>] [--since <date>] [--until <date>] [--category <values>] [--author <text>] [--intent <text>] [--exclude <values>] [--query-mode <mode:text>]... [-C <num>] [--answer|--verify] [--no-answer] [--max-answer-tokens <n>] [--context-budget-tokens <n>] [--context-budget-bytes <n>] [--min-score <score>] [--graph] [--no-expand] [--no-rerank] [--show-sources] [--json|--md]
965
965
  ```
966
966
 
967
967
  **Options:**
968
968
 
969
- | Option | Type | Default | Description |
970
- | ----------------------- | -------- | ------- | ---------------------------------------------------------------------------------- |
971
- | `--answer` | boolean | false | Generate short grounded answer |
972
- | `--no-answer` | boolean | false | Force retrieval-only output |
973
- | `--max-answer-tokens` | integer | config | Cap answer generation tokens |
974
- | `--since` | string | none | Modified-at lower bound (ISO date/time or relative token) |
975
- | `--until` | string | none | Modified-at upper bound (ISO date/time or relative token) |
976
- | `--category` | string | none | Filter to docs with matching category/content type (comma-separated) |
977
- | `--author` | string | none | Filter to docs where author contains value (case-insensitive) |
978
- | `--intent` | string | none | Disambiguating context for ambiguous questions without searching on that text |
979
- | `--exclude` | string | none | Hard-prune docs containing any comma-separated term in title/path/body |
980
- | `--query-mode` | string[] | none | Structured mode entry (`term:<text>`, `intent:<text>`, `hyde:<text>`). Repeatable. |
981
- | `-C, --candidate-limit` | integer | 20 | Max candidates passed to reranking |
982
- | `--no-expand` | boolean | false | Disable query expansion |
983
- | `--no-rerank` | boolean | false | Disable cross-encoder reranking |
984
- | `--show-sources` | boolean | false | Show all retrieved sources (not just cited) |
969
+ | Option | Type | Default | Description |
970
+ | ------------------------- | -------- | ------- | ---------------------------------------------------------------------------------- |
971
+ | `--answer` | boolean | false | Generate short grounded answer |
972
+ | `--verify` | boolean | false | Generate from a closed Context Capsule; verify every claim or abstain |
973
+ | `--no-answer` | boolean | false | Force retrieval-only output |
974
+ | `--max-answer-tokens` | integer | config | Cap answer generation tokens |
975
+ | `--context-budget-tokens` | integer | 12000 | Global token budget for verified Context evidence |
976
+ | `--context-budget-bytes` | integer | none | Optional global byte budget for verified Context evidence |
977
+ | `--min-score` | number | none | Minimum retrieval score from 0 through 1 |
978
+ | `--graph` | boolean | false | Include bounded graph expansion in verified Context retrieval |
979
+ | `--since` | string | none | Modified-at lower bound (ISO date/time or relative token) |
980
+ | `--until` | string | none | Modified-at upper bound (ISO date/time or relative token) |
981
+ | `--category` | string | none | Filter to docs with matching category/content type (comma-separated) |
982
+ | `--author` | string | none | Filter to docs where author contains value (case-insensitive) |
983
+ | `--intent` | string | none | Disambiguating context for ambiguous questions without searching on that text |
984
+ | `--exclude` | string | none | Hard-prune docs containing any comma-separated term in title/path/body |
985
+ | `--query-mode` | string[] | none | Structured mode entry (`term:<text>`, `intent:<text>`, `hyde:<text>`). Repeatable. |
986
+ | `-C, --candidate-limit` | integer | 20 | Max candidates passed to reranking |
987
+ | `--no-expand` | boolean | false | Disable query expansion |
988
+ | `--no-rerank` | boolean | false | Disable cross-encoder reranking |
989
+ | `--show-sources` | boolean | false | Show all retrieved sources (not just cited) |
985
990
 
986
991
  **Output (JSON):**
987
992
  See [Output Schemas](./output-schemas/ask.schema.json)
@@ -989,6 +994,25 @@ See [Output Schemas](./output-schemas/ask.schema.json)
989
994
  Notes:
990
995
 
991
996
  - `meta.answerContext` is optional explain payload for answer source selection.
997
+ - `--verify` implies answer generation and cannot be combined with
998
+ `--no-answer`. The JSON result adds the closed Capsule, freshness receipt,
999
+ four-state per-claim verdicts (`supported`, `contradicted`, `insufficient`,
1000
+ `uncertain`), exact evidence IDs and line spans, coverage, gaps, semantic
1001
+ verifier state, and explicit abstention. Support below 100% never returns the
1002
+ draft answer.
1003
+ - Terminal and Markdown verified output preserve the same verdicts, exact
1004
+ support/conflict spans, coverage, gaps, abstention, and capability
1005
+ degradation. With `--show-sources`, both formats list every retained Capsule
1006
+ evidence span with its exact URI and line range. JSON remains the canonical
1007
+ machine contract.
1008
+ - Verification classifies support only against the closed Capsule and its
1009
+ freshness receipt. It does not guarantee corpus completeness or source truth.
1010
+ An unavailable, incapable, failed, or malformed semantic verifier cannot mark
1011
+ claims supported; unresolved substantive claims remain uncertain and force
1012
+ abstention.
1013
+ - Verified retrieval records the normalized request and requested/attempted
1014
+ capability states in its Capsule. The active `--index` value is host-owned
1015
+ and used for both compilation and freshness verification.
992
1016
  - Strategy: adaptive coverage (relevance + query/facet coverage), not fixed top-N.
993
1017
  - Each result preserves optional configured `context`. Answer generation places
994
1018
  that trusted configuration in a separate prompt role from untrusted retrieved
@@ -1005,6 +1029,7 @@ Notes:
1005
1029
  ```bash
1006
1030
  gno ask "how do we deploy to staging"
1007
1031
  gno ask "termination clause" --collection work --answer
1032
+ gno ask "who owns launch?" --verify --show-sources
1008
1033
  ```
1009
1034
 
1010
1035
  ---
@@ -22,6 +22,8 @@ evals/agentic/
22
22
  fixture-db.ts
23
23
  scoring.ts
24
24
  promotion.ts
25
+ verified-ask-outcome.ts
26
+ verified-ask-promotion.ts
25
27
  registry.ts
26
28
  report.ts
27
29
  report-artifacts.ts
@@ -51,7 +53,13 @@ evals/fixtures/agentic-retrieval/
51
53
  agent-model.lock.json
52
54
  baseline/
53
55
  README.md
54
- fixture-agent/{report.json,canonical.json,observations.json,report.md}
56
+ fixture-agent/
57
+ report.json
58
+ canonical.json
59
+ observations.json
60
+ report.md
61
+ verified-ask-promotion.json
62
+ verified-ask-promotion.md
55
63
  optional/{qmd,local-model}/ # local opt-in evidence; not authoritative
56
64
  ```
57
65
 
@@ -400,7 +408,9 @@ and hashes, and promotion results remain included. `report.json` is schema
400
408
  valid. `canonical.json` contains that exact projection. `observations.json`
401
409
  holds environment, build observations, and full-identity receipt observations;
402
410
  committed temporary paths are projected to `<temp>`. `report.md` is the readable
403
- summary. The four files are staged and directory-renamed as one baseline set.
411
+ summary. The six files are staged and directory-renamed as one baseline set.
412
+ The verified Ask files are a separate attributable outcome lane; they do not
413
+ rename the Capsule retrieval promotion in `report.json`.
404
414
 
405
415
  ## Deterministic scoring
406
416
 
@@ -455,6 +465,19 @@ Claim linkage is:
455
465
  linkedSupportedClaims_capsule / substantiveClaims_capsule >= 0.95
456
466
  ```
457
467
 
468
+ Unsupported substantive claims must strictly decrease on a comparable paired
469
+ cohort:
470
+
471
+ ```text
472
+ unsupportedClaims_capsule < unsupportedClaims_gno
473
+ 1 - unsupportedClaims_capsule / unsupportedClaims_gno
474
+ ```
475
+
476
+ The report records both counts and the reduction. A missing paired baseline,
477
+ an identity mismatch, or a zero unsupported-claim baseline makes this reduction
478
+ unavailable/non-comparable; GNO reports that state rather than fabricating an
479
+ improvement.
480
+
458
481
  All denominators must be non-zero. Abstention-only tasks use their completion
459
482
  predicate and do not fabricate substantive claims. Every fixture-agent Capsule
460
483
  task must also emit byte-identical canonical Capsule payload JSON and matching
@@ -464,6 +487,64 @@ duplicates, identity mismatches,
464
487
  pairwise or aggregate accuracy loss, denominator failure, threshold miss, or
465
488
  nondeterminism fails promotion.
466
489
 
490
+ ## Verified Ask promotion formulas
491
+
492
+ The authoritative fixture-agent write additionally runs a separate 22-task
493
+ outcome lane. It excludes only the two declared expected-missing/abstention
494
+ tasks. Every included task must contain exactly one required substantive claim;
495
+ missing, duplicate, extra, or mismatched pairs fail closed.
496
+
497
+ The compatible cohort is an independent frozen contract, not inferred from the
498
+ artifact under validation:
499
+
500
+ ```text
501
+ t012ab3c t0a1b2c3 t123bc4d t1b2c3d4 t2c3d4e5 t3d4e5f6
502
+ t456ef70 t4e5f607 t567f081 t5f60718 t6071829 t6780192
503
+ t718293a t7891a03 t8293a4b t93a4b5c ta4b5c6d tb5c6d7e
504
+ tc6d7e8f td7e8f90 te8f901a tf901a2b
505
+ ```
506
+
507
+ The exact exclusions are `t234cd5e` and `t345de6f`, both with reason
508
+ `expected_missing_evidence`. Removing or replacing a complete receipt/score
509
+ pair and resealing every derived fingerprint still fails validation.
510
+
511
+ The baseline executes the production raw Ask path:
512
+ `searchHybrid` → `generateGroundedAnswer` → `processAnswerResult`. The candidate
513
+ executes production `buildVerifiedAsk`. Each pair shares the immutable native
514
+ index, task goal, collection, structured search modes, deterministic answer
515
+ agent/model fingerprint, and initial answer draft. Receipt and score identities
516
+ bind task, lane, trial, seed, and agent. Pairing also requires identical fixture,
517
+ index, request, and model fingerprints.
518
+
519
+ Four fixed, diverse tasks receive an unsupported deterministic draft in both
520
+ lanes. The other 18 receive the oracle-supported draft. This controlled
521
+ adversarial subset tests enforcement at the product boundary; it does not claim
522
+ general model quality.
523
+
524
+ For every pair and in aggregate:
525
+
526
+ ```text
527
+ answerAccuracy_verified(p) >= answerAccuracy_raw(p)
528
+ mean(answerAccuracy_verified) >= mean(answerAccuracy_raw)
529
+ unsupportedSubstantiveClaims_verified < unsupportedSubstantiveClaims_raw
530
+ ```
531
+
532
+ `verified-ask-promotion.json` contains canonical receipts, identity-bearing
533
+ scores, exact cohort/exclusions, metrics, and the gate result.
534
+ `verified-ask-promotion.md` is its readable projection. Temporary collection
535
+ paths and timings are excluded from the canonical contract; fixture, index,
536
+ request, model, exact answer, citation hashes, verification status, and scored
537
+ outcome remain bound. The evaluator parses the typed claim from the exact final
538
+ product answer and scores it against the independent fn-97 oracle; it
539
+ recomputes receipt, answer, score, and artifact fingerprints rather than
540
+ trusting harness-assigned claim or score fields. Raw and verified lane semantics
541
+ are validated independently. A supported final answer is exactly one encoded
542
+ typed claim followed by its lane citation (`[1].` or one
543
+ `[evidence:<sha256>].`); prefixes, extra claims, and trailing prose are invalid.
544
+ An abstention must equal the production abstention text and contain no
545
+ citations. Authoritative generation refuses a dirty Git checkout and records
546
+ the exact clean source commit.
547
+
467
548
  ## Commands
468
549
 
469
550
  Contract tests are ordinary offline tests:
@@ -486,9 +567,10 @@ lifecycles, and the fixture agent. qmd is lazily registered and never runs by
486
567
  default. A requested unavailable qmd lane produces the complete requested
487
568
  harness-error matrix/report and exits `2`; it never disappears or downgrades.
488
569
 
489
- Exit `0` means a complete run and, when applicable, passing promotion. Exit `1`
490
- means the complete Capsule promotion gate failed. Exit `2` means invalid CLI,
491
- preflight, harness, or requested-adapter failure. `--write` accepts only a full
570
+ Exit `0` means a complete run and, when applicable, both promotions pass. Exit
571
+ `1` means the complete Capsule or verified Ask promotion gate failed. Exit `2`
572
+ means invalid CLI, preflight, harness, or requested-adapter failure. `--write`
573
+ accepts only a full
492
574
  24-task/two-lifecycle lane: the fixture-agent three-adapter lane writes the
493
575
  authoritative baseline, while qmd and the three-trial cached-local-model lane
494
576
  write only under `baseline/optional/`. Filtered or mixed writes are refused and
package/spec/mcp.md CHANGED
@@ -151,7 +151,8 @@ Collection names are case-insensitive on input and normalized to lowercase in re
151
151
  ### Private retrieval metadata
152
152
 
153
153
  When local tracing is enabled, successful `gno_search`, `gno_vsearch`,
154
- `gno_query`, `gno_get`, and `gno_context` results include non-model-visible
154
+ `gno_query`, `gno_get`, `gno_context`, and `gno_ask` results include
155
+ non-model-visible
155
156
  top-level response metadata:
156
157
 
157
158
  ```json
@@ -196,6 +197,54 @@ content or a filesystem path. Aggregate exports reject open/missing traces and
196
197
  preserve each stored terminal state without treating partial, failed, or
197
198
  cancelled as negative feedback.
198
199
 
200
+ ### gno_ask
201
+
202
+ Generate and verify one answer against a closed Context Capsule. This is a
203
+ separate read-only tool; raw retrieval remains on `gno_query`, and trace
204
+ mutation authority is not widened.
205
+
206
+ Required input:
207
+
208
+ ```json
209
+ {
210
+ "query": "Who owns the launch decision?",
211
+ "verify": true
212
+ }
213
+ ```
214
+
215
+ `verify` must be the literal `true`; implicit or raw Ask requests are rejected.
216
+ Optional fields are `collection`, `limit` (default 5), `minScore`, `lang`,
217
+ `intent`, `candidateLimit`, `exclude`, `queryModes`, `tagsAll`, `tagsAny`,
218
+ `since`, `until`, `categories`, `author`, `graph`, `noGraph`, `noRerank`,
219
+ `maxAnswerTokens`, `contextBudgetTokens`, and `contextBudgetBytes`. Input
220
+ objects are closed.
221
+
222
+ `structuredContent` uses the
223
+ [`ask`](./output-schemas/ask.schema.json) contract. Its `verification` object
224
+ contains the canonical Capsule, freshness receipt, four-state per-claim
225
+ verdicts, exact support/conflict evidence IDs and line spans, coverage, gaps,
226
+ semantic verifier capability, and explicit abstention. Every substantive claim
227
+ must be supported; otherwise the draft is withheld and `answerStatus` is
228
+ `abstained`. Contradiction is never inferred from missing evidence.
229
+
230
+ Model-visible text renders the same answer status, coverage, semantic state,
231
+ per-claim verdicts, exact `gno://` line spans, evidence IDs, gaps, and cited
232
+ sources. Capability degradation comes from the Capsule's
233
+ requested/attempted/outcome states.
234
+
235
+ Verification is a closed-Capsule support classification, not a factual
236
+ guarantee. It does not assert that the indexed corpus is complete or that source
237
+ statements are true. Unavailable, incapable, failed, or malformed semantic
238
+ verification cannot produce support; unresolved substantive claims remain
239
+ uncertain and force abstention.
240
+
241
+ The server-owned effective index is used for both Capsule compilation and
242
+ freshness verification. One Ask-owned trace covers retrieval, Context,
243
+ generation, verification, and exact retained citations. The trace ID remains
244
+ transport-only in `_meta`; no dead ID is emitted after retention eviction.
245
+ Support/conflict spans are inspectable and explicitly labelable, but they do
246
+ not create implicit relevance judgments.
247
+
199
248
  ### gno_context
200
249
 
201
250
  Compile a deterministic, extractive Context Capsule. The active MCP server
@@ -213,8 +262,9 @@ Required input:
213
262
  ```
214
263
 
215
264
  Optional input fields are `query`, `collections`, `uriPrefix`, `queryModes`,
216
- `tagsAll`, `tagsAny`, `categories`, `author`, `lang`, `since`, `until`, `graph`,
217
- `limit`, `candidateLimit`, `budgetBytes`, `safetyMarginTokens`,
265
+ `tagsAll`, `tagsAny`, `categories`, `author`, `lang`, `intent`, `exclude`,
266
+ `minScore`, `since`, `until`, `graph`, `noRerank`, `limit`, `candidateLimit`,
267
+ `budgetBytes`, `safetyMarginTokens`,
218
268
  `safetyMarginBytes`, `depthPolicy` (`fast`, `balanced`, or `thorough`), and
219
269
  `format` (`json` or `md`). Input objects are closed: unknown fields return
220
270
  `invalid_input`. Unknown collections return `invalid_filter` before model or