query-parser
Extract structured legal-research facets (jurisdiction, doc_type, citation_id, date_range, practice_area, matter_id) from a natural-language query. Invoked first by every retrieval-bearing skill (statute-compare, case-retrieve, ...).
- License 许可
- CC-BY-4.0
- 所属仓库
- KairosPan/kairos
- 最近更新
- 2026-07-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- a2a
- { "expose": true, "billing": { "model": "free" }, "endpoint_path": "/a2a/skills/query-parser" }
- name
- query-parser
- inputs
- { "$ref": "./schemas/inputs.json" }
- limits
- { "max_tokens": 1500, "max_latency_seconds": 8 }
- models
- { "fallback": "claude-opus-4-7", "forbidden": [], "preferred": "deepseek-v4-flash" }
- safety
- { "upl_check": "not-applicable", "disclaimer": "legal-research-only", "matter_scope": "enforced", "citation_verification": "not-applicable", "jurisdiction_consistency": "advisory" }
- license
- CC-BY-4.0
- outputs
- { "$ref": "./schemas/outputs.json" }
- version
- 0.1.0
- eval_set
- ./evals/query-parser-v1.jsonl
- triggers
- { "keywords": [ "parse query", "extract facets", "legal query", "query parser" ] }
- languages
- [ "en", "zh" ]
- optimizer
- { "L2_rag": "disabled", "L4_model": "shadow", "L1_prompt": "enabled", "L3_routing": "enabled", "L6_self_mod": "disabled", "L5_synthesis": "disabled" }
- risk_tier
- low
- maintainer
- kairos-core
- risk_class
- low
- visibility
- public
- description
- Extract structured legal-research facets (jurisdiction, doc_type, citation_id, date_range, practice_area, matter_id) from a natural-language query. Invoked first by every retrieval-bearing skill (statute-compare, case-retrieve, ...).
- display_name
- Query Facet Parser
- golden_cases
- []
- strict_model
- false
- target_users
- [ "lawyer", "researcher", "student" ]
- default_model
- claude-opus-4-7
- jurisdictions
- [ "agnostic" ]
- allowed_models
- [ "claude-opus-4-7", "deepseek-v4-pro", "deepseek-v4-flash" ]
- practice_areas
- []
- required_skills
- []
- requires_skills
- []
- requires_sandbox
- false
- side_effect_class
- pure_read
- requires_connectors
- null
02 资源文件 7
- 参考文档evals/golden_cases/gc-query-parser-001.yaml369 B
- 参考文档evals/golden_cases/gc-query-parser-002.yaml385 B
- 参考文档evals/golden_cases/gc-query-parser-003.yaml408 B
- 其他evals/query-parser-v1.jsonl444 B
- 参考文档prompts/system.md923 B
- 参考文档schemas/inputs.json275 B
- 参考文档schemas/outputs.json768 B
03 SKILL.md 正文
Query Parser
When to use
First step of every retrieval-bearing skill. Turns "compare GDPR and CCPA on automated decision-making" into structured facets the retrieval pipeline can filter on.
Output contract
{
topic: string,
jurisdictions: [string],
doc_types: [string], // statute / case / regulation / treatise
citation_ids: [string], // explicit cites the user mentioned (e.g., "GDPR Art. 22")
date_range: { start?: date, end?: date },
practice_areas: [string],
matter_id: string // defaults to "public" if not present
}
Notes
- This skill never produces final user-facing output, so disclaimer / citation verifier / safety gate run in advisory mode.
- The matter_id facet is mandatory for downstream retrieval (database-design §3.4.5). If the caller omits it, we set it to "public".
04 同仓库更多 Skills
statute-compare
Compare statutory provisions on the same topic across two or more jurisdictions. Invoke when the user asks "regulation / comparison / difference / similarities and differences of X in A/B/C jurisdictions". Covers five dimensions: scope of application, elements, exceptions, penalties, effective date.
setup-interview
On first install/subscription of a skill, run a guided interview to learn the lawyer's playbook (jurisdiction / citation style / risk tolerance / output preferences) and write the answers to user/firm preferences. Mirrors the Anthropic plugin setup-interview UX. Feeds the §5 self-improving feedback source.
retrieval-hybrid
Run the §7.4 hybrid pipeline (structural filter → BM25/FTS5 → local semantic → citation graph → RRF fusion → local rerank → MMR) for one query, returning ranked candidates with full source provenance. Invoke whenever a skill needs to fetch passages from any matter (private or public) before drafting.
document-intake
Advisory guidance on getting a document into a matter's private index: which file formats are supported, how confidentiality levels behave (privileged documents are stored but never FTS-indexed, per database-design §3.2), and where to upload. The actual ingestion + extraction + indexing is performed by the conversation file-upload route, NOT by this skill — this skill only explains the path.
disclaimer-injector
Inject the appropriate legal disclaimer (legal-research-only, in-house-counsel-only, or academic-use) into the trailing `disclaimer` field of a draft response. Mandatorily run by the Safety Gate; skill authors should not invoke directly.
contract-risk-annotate
Take an extracted clause list and annotate each clause with jurisdiction-aware risks (governing law mismatch, unenforceable non-compete under target jurisdiction, missing carve-outs, one-sided indemnification, etc.). Invoked after contract-clause-extract; uses statute-compare under the hood when the user asks for cross-jurisdiction risk.