Files
kebab/docs/wire-schema/v1/search_response.schema.json
altair823 5d9ea588ed docs(v0.20.1): polish PR-review findings (README/HOTFIXES/schema/SKILL)
opus PR-level final review (Approved with notes) 의 4 minor finding
mechanical 정정:

1. README.md — `kebab search` row 의 영어 substring 매칭 표현이
   V007 시절 그대로였음. V009 의 whole-token 회귀 (substring → V002
   동작) 를 정직히 명시 + vector/hybrid mode 권장 안내.
2. tasks/HOTFIXES.md — 2026-05-28 entry 의 file path 정정. lexical.rs
   는 lindera 호출자가 아니라 build_match_string 의 MIN_QUERY_CHARS
   3→2 갱신만; lindera helper 의 실제 owner 는 kebab-chunk/src/lib.rs.
   ingest.rs 는 본 PR scope 외, eager backfill hook 위치는 kebab-app/
   src/app.rs::App::open_with_config.
3. docs/wire-schema/v1/search_response.schema.json — `hint` field
   description 이 V007 trigram 3-char minimum 시절 advisory 시그니처
   그대로. v0.20.1 에서 helper retired + always-omit 사실 명시
   (forward-compat 차원에서 field 만 schema 에 보존).
4. integrations/claude-code/kebab/SKILL.md — `hint` field 설명의
   self-contradiction ("present only with trigram in edge cases" vs
   "Korean 2-char now supported") 해소. retired + reuse 가능 명시.

PR-level reviewer recommendation: "Merge as-is — block 사유 아님 (모든
finding minor)". 본 commit 은 reviewer 의 옵션 1 (별 docs hotfix
commit) 채택.

Spec: docs/superpowers/specs/2026-05-28-v0.20.x-korean-morphological-tokenizer-spec.md
Plan: docs/superpowers/plans/2026-05-28-v0.20.x-korean-morphological-tokenizer-plan.md (PR-level finding follow-up)
2026-05-28 12:53:00 +00:00

39 lines
2.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://kb.local/wire/v1/search_response.schema.json",
"title": "SearchResponse v1",
"description": "Top-level wrapper for `kebab search --json` output. Replaces the bare `search_hit.v1[]` array — wraps it with pagination + truncation metadata. Token counts are approximate (chars/4 estimate, no tokenizer dep). On `truncated: true`, caller may either widen `--max-tokens` or follow `next_cursor` for the next page. Stale `next_cursor` (corpus_revision changed since issued) returns `error.v1.code = stale_cursor`.",
"type": "object",
"required": ["schema_version", "hits", "next_cursor", "truncated"],
"properties": {
"schema_version": { "const": "search_response.v1" },
"hits": { "type": "array", "description": "search_hit.v1[]" },
"next_cursor": { "type": ["string", "null"], "description": "Opaque base64 cursor for next page; null when no more hits." },
"truncated": { "type": "boolean", "description": "True when budget forced snippet shortening or k reduction. Independent of `next_cursor`: caller may widen `max_tokens` (re-issue same query) or follow `next_cursor` (advance through more hits) or both." },
"trace": {
"type": "object",
"description": "p9-fb-37: present iff caller passed --trace / SearchOpts.trace=true. Lex/vec pre-fusion lists + RRF union + per-stage timing.",
"required": ["lexical", "vector", "rrf_inputs", "timing"],
"properties": {
"lexical": { "type": "array", "items": { "type": "object" } },
"vector": { "type": "array", "items": { "type": "object" } },
"rrf_inputs":{ "type": "array", "items": { "type": "object" } },
"timing": {
"type": "object",
"required": ["lexical_ms", "vector_ms", "fusion_ms", "total_ms"],
"properties": {
"lexical_ms": { "type": "integer", "minimum": 0 },
"vector_ms": { "type": "integer", "minimum": 0 },
"fusion_ms": { "type": "integer", "minimum": 0 },
"total_ms": { "type": "integer", "minimum": 0 }
}
}
}
},
"hint": {
"type": "string",
"description": "Reserved for advisory strings on `search_response.v1`. v0.17.0 (V007 trigram) 시절 3자 미만 query 안내용 helper 였으나, v0.20.1 (V009 morphological tokenizer) 에서 한국어 2자 query 가 hit 가능해져 helper 가 제거됨 (`short_query_hint` retired). 본 field 는 forward-compat 차원에서 schema 에 보존되어 항상 omit. 향후 advisory 가 다시 필요해지면 동일 shape 으로 reuse 가능."
}
}
}