/resolver-query
Look up which rule in Meta/RESOLVER.md applies to a natural-language question. The skill itself does NOT call an LLM. It reads RESOLVER.md, parses every rule row, and returns either a decisive match, a ranked candidate list, or "no rule matches." The host Claude session does the natural-language understanding on top of the structured output.
When to run
- An operator wonders which rule governs a recurring question (pricing, deploy, refund, hiring exception).
- A new teammate wants to find the policy for a scenario without reading the full resolver index.
- Any time the resolver layer should answer a query and the operator wants the structured candidate set in one call.
How it works
- The skill reads
Meta/RESOLVER.md from the vault root.
- It parses the YAML frontmatter for the build timestamp and counts.
- It parses every row of the
## Rules table into a structured record.
- It runs a deterministic match against the question:
a. Tokenize the question (lowercase, drop stopwords, keep stems).
b. For each rule, score by token overlap against
rule_id, source path, skill link, and source-file H1/topic when available.
c. If exactly one rule scores >= the decisive threshold, return that rule directly.
d. Otherwise return up to --limit rules ranked by score.
e. If no rule scores above zero, return no rule matches this query.
- The host session then reads the structured output and frames the answer to the operator.
Step 1: Run the skill
python3 skills/resolver-query/query.py "How do we handle pricing exceptions?" \
--vault-root <vault>
Output is a JSON document on stdout with shape:
{
"question": "...",
"vault_root": "...",
"resolver_built_at": "...",
"rule_count": 17,
"match_kind": "decisive | ranked | none",
"matched_rules": [
{
"rule_id": "...",
"type": "decision | workflow | exception | fact",
"status": "active | stale | superseded | under-review | unknown",
"last_verified": "...",
"source_path": "...",
"skill_link": "...",
"score": 0.0
}
],
"summary": "..."
}
Step 2: Read the matched rule
If the match kind is decisive, the host session opens the rule's source file (source_path). If ranked, the host session presents the top candidates to the operator and lets them pick. If none, the host session tells the operator no rule applies and offers to draft one manually.
Rules
- The skill is read-only. It NEVER writes to
RESOLVER.md or any source file.
- The skill makes no external network calls. No LLM API is invoked from inside
query.py.
- The matching algorithm is deterministic and stdlib-only. The host Claude session is the natural-language layer on top.
- When
match_kind == none, the skill returns the empty matched_rules list and the host session tells the operator no rule matches; it does not invent one.
Boundary
- Adjacent skills:
scripts/resolver-build.py rebuilds RESOLVER.md.
scripts/resolver-conflict-report.py surfaces conflicts in JSON.
scripts/resolver-branch-merge-prompt.py drafts merge prompts.
- This skill READS the rendered index. It does not refresh, edit, or rewrite it.
1---2name: resolver-query3description: Use when an operator asks which rule or policy governs a question — pricing exceptions, deploys, refunds, hiring — or wants to look up the matching rule in Meta/RESOLVER.md without reading the whole index by hand. Triggers: /resolver-query <question>, "which rule applies", "what's our policy on X", "does a rule cover this". Not for writing or editing rules (read-only) and not for rebuilding RESOLVER.md (use resolver-build.py).4---56# /resolver-query78Look up which rule in `Meta/RESOLVER.md` applies to a natural-language question. The skill itself does NOT call an LLM. It reads RESOLVER.md, parses every rule row, and returns either a decisive match, a ranked candidate list, or "no rule matches." The host Claude session does the natural-language understanding on top of the structured output.910## When to run1112- An operator wonders which rule governs a recurring question (pricing, deploy, refund, hiring exception).13- A new teammate wants to find the policy for a scenario without reading the full resolver index.14- Any time the resolver layer should answer a query and the operator wants the structured candidate set in one call.1516## How it works17181. The skill reads `Meta/RESOLVER.md` from the vault root.192. It parses the YAML frontmatter for the build timestamp and counts.203. It parses every row of the `## Rules` table into a structured record.214. It runs a deterministic match against the question:22 a. Tokenize the question (lowercase, drop stopwords, keep stems).23 b. For each rule, score by token overlap against `rule_id`, source path, skill link, and source-file H1/topic when available.24 c. If exactly one rule scores >= the decisive threshold, return that rule directly.25 d. Otherwise return up to `--limit` rules ranked by score.26 e. If no rule scores above zero, return `no rule matches this query`.275. The host session then reads the structured output and frames the answer to the operator.2829## Step 1: Run the skill3031```bash32python3 skills/resolver-query/query.py "How do we handle pricing exceptions?" \33 --vault-root <vault>34```3536Output is a JSON document on stdout with shape:3738```json39{40 "question": "...",41 "vault_root": "...",42 "resolver_built_at": "...",43 "rule_count": 17,44 "match_kind": "decisive | ranked | none",45 "matched_rules": [46 {47 "rule_id": "...",48 "type": "decision | workflow | exception | fact",49 "status": "active | stale | superseded | under-review | unknown",50 "last_verified": "...",51 "source_path": "...",52 "skill_link": "...",53 "score": 0.054 }55 ],56 "summary": "..."57}58```5960## Step 2: Read the matched rule6162If the match kind is `decisive`, the host session opens the rule's source file (`source_path`). If `ranked`, the host session presents the top candidates to the operator and lets them pick. If `none`, the host session tells the operator no rule applies and offers to draft one manually.6364## Rules6566- The skill is read-only. It NEVER writes to `RESOLVER.md` or any source file.67- The skill makes no external network calls. No LLM API is invoked from inside `query.py`.68- The matching algorithm is deterministic and stdlib-only. The host Claude session is the natural-language layer on top.69- When `match_kind == none`, the skill returns the empty `matched_rules` list and the host session tells the operator no rule matches; it does not invent one.7071## Boundary7273- Adjacent skills:74 - `scripts/resolver-build.py` rebuilds `RESOLVER.md`.75 - `scripts/resolver-conflict-report.py` surfaces conflicts in JSON.76 - `scripts/resolver-branch-merge-prompt.py` drafts merge prompts.77- This skill READS the rendered index. It does not refresh, edit, or rewrite it.