knowledge-query · git:20260913.a425dec · 2026-09-13 · sha256 6de37c53e1c7e5cb

knowledge-query git:20260913.a425decB

Immutable. This exact content never changes and is served at /api/v1/blob/6de37c53e1c7e5cb.

---
name: {{skillName}}
description: Query the approved, source-linked knowledge bundled with {{displayName}}. Use for questions about included entities, APIs, behavior, procedures, constraints, decisions, troubleshooting, relationships, and package coverage.
---

# Knowledge Query

Answer from the approved knowledge bundled with this package. Navigate through
its indexes before opening individual pages, and treat the visible section body
as evidence rather than relying on memory or frontmatter summaries.

## Query Procedure

1. Classify the request as entity lookup, explanation, procedure, rule,
   relationship, detail, or coverage audit.
2. Open the most relevant root index, such as `{{wikisRoot}}/index.md`, then
   follow its links to a likely page.
3. Read only the sections needed for the question. Use frontmatter to select
   scope, not to support factual claims.
4. For relationship or impact questions, read the relevant pages' explicit
   explanations. Shared names, directory placement and links alone do not prove a relationship.
5. Answer from reader-visible section content and cite the supporting page or section.
6. If the package lacks evidence, report the gap and what was checked instead
   of inferring from nearby content.

## Package Roots

| Root | Use |
|---|---|
| `{{wikisRoot}}/` | Code, business and product reference articles. |
| `{{guidesRoot}}/` | Architecture, procedures, FAQs, decisions, incidents, and troubleshooting. |
| `{{rulesRoot}}/` | Standards, constraints, acceptance criteria, and test scenarios. |
| `{{featsRoot}}/` | Feature knowledge when selected into the package. |

Start from the root that matches the request. A missing root means that category
was not selected into this package.

## Route By Intent

| Intent | First move |
|---|---|
| Vague topic or unknown name | Open the likely root index and choose a page from its grouping. |
| Named entity, API, domain, or action | Open the matching page or nearest group index. Show candidates if names are ambiguous. |
| Architecture, procedure, FAQ, decision, or incident | Start from `{{guidesRoot}}/index.md`. |
| Standard, constraint, acceptance, or test question | Start from `{{rulesRoot}}/index.md`. |
| Relationship or impact | Read the relevant explanations and state any coverage limits. |
| Detail inside a known page | Read the relevant Markdown heading and its body. |
| Coverage, gap, or inventory | Inspect the root indexes and `context-build-inventory.json`. |

## Evidence Contract

Use each opened page or package artifact as an evidence card:

| Evidence | Valid use |
|---|---|
| Page path | Page identity and citation handle. |
| Frontmatter title, description, and tags | Navigation and scope selection only. |
| Markdown headings | Locate and cite a section within its page. |
| Reader-visible section body | Primary support for factual claims. |
| Exported source attribution | Locate the original material when available; read it before extending a claim. |
| Root indexes and build inventory | Package scope and coverage evidence. |

Do not infer a relationship from page co-occurrence. Published pages do not need
production identifiers or source bookkeeping to be usable. Cite their readable
paths and headings; do not search for missing technical metadata or ask users
to supply it. Open the build inventory only for coverage questions,
or when a maintainer needs to locate the original approved page via
`dist_path` → `approved_path`. Source attribution is exported automatically from
the workspace's fragment references. If the original material is
not bundled, answer only from the visible approved content and state its limits.

## Search Fallback

Search only when indexes and page structure do not identify a useful scope, or
when a candidate page is too large to read in full. Use `rg` for an exact name,
API, configuration key, path, or error string. For multiple terms, Chinese
phrases, or several large indexes, run the bundled
[`scripts/search.mjs`](scripts/search.mjs) BM25 ranker:

```bash
node <current knowledge-query Skill directory>/scripts/search.mjs --query '<terms>' --limit 8
```

The script locates `{{packageName}}` when it runs inside the package tree. If a
package manager copied this Skill elsewhere, add `--root <package directory
containing context-build-inventory.json>`, or use `--base <package collection>`
to locate this package by its inventory name. It chunks Markdown mechanically
by headings and bounded line ranges, then returns paths, line ranges, headings,
and previews; it does not interpret meaning.

Treat every hit as a lead and open its page and section before answering. For
relationship or impact claims, cite the explanation that actually establishes
the relationship; BM25 scores and text co-occurrence do not establish it.

## Citations And Gaps

Use compact citations tied to claims:

```text
Page:         <claim> [<root>/path/page.md]
Section:      <claim> [<root>/path/page.md, heading: <visible heading>]
Relationship: <claim> [<root>/path/page.md, heading: <supporting explanation>]
Coverage:     <claim> [context-build-inventory.json]
```

When evidence is missing, return:

```text
Gap: this package does not contain evidence for <missing point>.
Checked: <indexes, pages, or artifacts>.
Next useful source: <source document or page if known>.
```

Distinguish “not evidenced by this package” from “not true.” Do not fill gaps
from memory, previous conversations, or source files outside the package.

## Package Boundary

- The bundled OKF-compatible roots are the source of truth for this Skill.
- The package contains approved knowledge selected by its Context workspace; it
  does not claim complete coverage of the underlying product or codebase.
- Do not scan every page when a narrower indexed scope answers the
  request.

Approved knowledge files: `{{knowledgeCount}}`

{{!-- Template author guidance (not part of the published query Skill):

This is a complete generic query Skill, but package authors should replace or
edit it before publishing when the package has project-specific terminology,
common user intents, preferred entry pages, known limits, or task workflows.
Update the description, routing table, and package-boundary guidance to match
the actual package. If the generic behavior is intentionally sufficient,
explicitly accept the unchanged default during Context package-template review.
--}}