Ground answers in retrieved user-corpus spans; cite every claim or refuse when retrieval is empty.
Resources
1Install
npx skillscat add ardurai/ardur-agent/cite-or-refuse Install via the SkillsCat registry.
Cite-or-refuse grounded mode
Use this skill whenever the user requests an answer that depends on private,
workspace, or user-corpus knowledge rather than general reasoning. The answer is
allowed only when it is grounded in retrieved spans from the user corpus.
Mandatory preflight
- Query the configured user-corpus retriever before drafting the answer.
- Treat the retrieval result as empty when there are zero spans, every span has
an unusable body, or the retrieval layer reports an authorization/error state
that prevents reading the corpus. - If retrieval is empty, do not answer from memory or model prior knowledge.
Refuse with the template below and include a grounding receipt showingstatus: refused_empty_retrieval. - If retrieval returns spans, use only those spans for corpus-dependent claims.
General-language glue is fine, but factual claims about the corpus require a
citation.
Citation rules
- Cite each corpus-dependent sentence with one or more source span markers.
- Source markers use the stable span id form
[S<n>], where each marker maps to
one retrieved source span in the source list. - Never cite a document as a whole when the retriever returned narrower spans.
- Do not merge nearby spans unless the retrieval layer explicitly returned the
merged span. - If a requested detail is not present in the retrieved spans, say that the
retrieved corpus does not support that detail instead of guessing.
Required response shape
When grounded spans are available, respond in this order:
Answer— concise answer with inline[S<n>]citations on every
corpus-dependent claim.Sources— one bullet per cited span, including span id, document/source
title or URI, byte/line/time offsets when available, and a short quoted
excerpt. Keep excerpts minimal and do not invent offsets.Grounding receipt— a compact machine-readable block following@./receipt-schema.md.
When retrieval is empty, use this refusal template:
I can't answer that from the user corpus because retrieval returned no usable
spans. I can try a different query, use a source you provide, or answer without
corpus grounding if you explicitly allow an ungrounded answer.
Then include Grounding receipt with status: refused_empty_retrieval and an
empty cited_spans list.
Grounding receipt requirements
The receipt is an audit record for the turn. It must include:
mode: cite_or_refusestatus:answered_with_citations,refused_empty_retrieval, orrefused_unsupported_claimretrieval_query: the exact query or task sent to retrievalretrieved_span_count: number of usable spans returnedcited_spans: stable ids for every span cited in the answeranswer_claims: a list of claim summaries with the span ids supporting each
claimrefusal_reason: present for refused turns
See @./receipt-schema.md for the exact JSON shape.
Safety checks before finalizing
- Every corpus-dependent sentence has a citation.
- Every citation appears in
Sourcesandcited_spans. - Every
Sourcesitem is copied from retrieval metadata/span text, not invented. - The answer contains no unsupported private-corpus facts.
- Empty retrieval produced a refusal, not a best-effort answer.