Agent skill

Grounded Answer

by JetXu-LLM in JetXu-LLM/DocMason

Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check.

Apache-2.0Auto-check passedKnowledge Management

Install Grounded Answer

skills CLI
$ npx skills add JetXu-LLM/DocMason --skill grounded-answer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JetXu-LLM/DocMason grounded-answer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JetXu-LLM/DocMason.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/canonical/grounded-answer .claude/skills/grounded-answer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
grounded-answer
GitHub stars
147
Token cost
~3.1k tokens
SKILL.md length
1,576 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check.

  • Works in 11 steps: Start from canonical ask turn metadata… → Normalize the user question and… → Run docmason retrieve "" --json… → …
  • Knowledge Management work in your project
  • SKILL.md covers Front-Door Precondition, Required Capabilities, Procedure and Escalation Rules, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Grounded Answer is an agent skill from JetXu-LLM/DocMason. Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `workflow.json`).

It sits in Knowledge Management. The repository describes itself as: DocMason is a repo-native agent that turns your complex office files into a local LLM knowledge base and your second brain. The repo is the app. Codex is the runtime. The licence is Apache-2.0.

When your agent uses it

  • Knowledge Management work in your project

Example prompts

  • “/grounded-answer”

Workflow steps

11 steps, taken from the first numbered list in SKILL.md.

  1. Start from canonical ask turn metadata instead of assuming every direct answer is purely KB-grounded.
  2. Normalize the user question and decompose it only when that improves grounded retrieval.
  3. Run docmason retrieve "" --json --compact for the initial question or sub-question when KB evidence is part of the answer path.
  4. Inspect the strongest evidence bundles, matched units, graph expansions, render references, and published-evidence sufficiency judgment.
  5. Run provenance tracing for the strongest support when you need corroboration, contradiction checks, or answer-state clarification
  6. Inspect renders when
  7. Draft the canonical answer file under runtime/answers/ when conversation context exists.
  8. When the answer is externally verified, persist the lightweight external support manifest before or alongside the final trace so the…
  9. Run docmason trace --answer-file --json --compact as the final grounding check.
  10. Emit one of these final answer states
  11. Return the final answer, final answer_state, overall support_basis, support boundary, and next steps to the main agent.

What it can do on your machine

Read from SKILL.md and the folder at commit 362417b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Grounded Answer loads about 3.1k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 1,576 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JetXu-LLM/DocMason at commit 362417b, republished under its Apache-2.0 licence (© JetXu-LLM). 1,576 words, ~3,120 tokens.

Download SKILL.mdSave it as .claude/skills/grounded-answer/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
grounded-answer
description
Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check.

Grounded Answer

Use this skill when the task is to answer a question from the published DocMason knowledge base rather than only retrieve evidence.

This is the inner specialist answer workflow behind the user-facing ask entry surface. Ordinary users should not need to name this workflow explicitly before asking business questions.

Front-Door Precondition

  • grounded-answer is not a free-standing ordinary front door.
  • Start only from canonical ask turn metadata and canonical ask runtime ownership.
  • Start only after canonical ask has already handed the live turn here with status = execute and inner_workflow_id = grounded-answer.
  • If the current turn is missing that ask-owned handoff, stop and route back to ask.

Required Capabilities

  • local file access
  • shell or command execution
  • ability to inspect structured JSON output
  • ability to inspect rendered images when the cited evidence requires visual confirmation

If the agent cannot inspect required rendered evidence, stop and explain that the environment is not capable enough for grounded answering.

Procedure

  1. Start from canonical ask turn metadata instead of assuming every direct answer is purely KB-grounded.
    • honor the ask-owned work_brief, resolved decisions, accepted scopes, and affected-output boundary; use them to preserve the intended medium and critical distinctions without reopening decisions this workflow does not own
    • treat answer_state as the top-level four-state answer contract
    • choose an explicit support_basis for the overall answer:
      • kb-grounded
      • external-source-verified
      • model-knowledge
      • mixed
    • honor ask-provided reference_resolution, source_scope_policy, evidence_requirements, and support_contract; when evidence_requirements is present, treat it as the canonical odd-question inspection contract before widening scope or changing evidence basis
    • write a short support ledger before drafting:
      • which source boundary must survive
      • which comparison sources must both survive
      • which published evidence channels are required
      • whether this turn still has the one allowed contract-repair chance
  2. Normalize the user question and decompose it only when that improves grounded retrieval.
  3. Run docmason retrieve "<query>" --json --compact for the initial question or sub-question when KB evidence is part of the answer path.
    • if you truly need the full nested retrieve payload, redirect full --json to a local file and inspect it selectively instead of streaming it into the live chat context
    • treat compact retrieve as the stable host-facing projection; inspect results, reference_resolution, source_scope_policy, and recommended_hybrid_targets before reaching for nested JSON
    • do not build alternate compact schemas with ad hoc jq assumptions such as .matches
    • prefer published affordance sidecars and already-published evidence channels over ad hoc source inspection
    • inspect reference_resolution first when the user has named a document or locator in user-native terms
    • keep DocMason workspace commands sequential inside the same live answer path; do not overlap retrieve, trace, sync, status, or validate-kb while a lease-owning step is still running
  4. Inspect the strongest evidence bundles, matched units, graph expansions, render references, and published-evidence sufficiency judgment.
    • when reference_resolution.status is exact, preserve that narrowing and do not let neighboring documents silently dilute it
    • when reference_resolution.status is approximate but unit_match_status is exact, preserve the approximate notice but still treat the resolved source narrowing as intentional
    • when reference_resolution.status is approximate or unresolved, keep the inline notice and answer wording honest about that boundary
    • when the question is artifact-sensitive, inspect compact retrieval fields first:
      • matched_artifact_ids
      • matched_unit_ids
      • matched_overlay_unit_ids
      • focus_render_assets
      • recommended_hybrid_targets
      • score details such as structure_context_bonus, semantic_overlay_bonus, and compare_coverage_bonus
    • when the answer boundary truly depends on exact artifact metadata such as section_path, caption_text, continuation_group_ids, procedure_hints, or semantic_labels, inspect a file-first full retrieve capture or the published artifact sidecars rather than pasting the nested payload into chat
    • treat those published payloads as an ordered evidence path: first decide whether retrieved text, structure, notes, or media already settle the claim, then inspect cited focus_render_assets, render refs, or page spans when visual confirmation would materially change the answer, and only then escalate
    • when published sufficiency fails because of hard-artifact semantic gaps, the grounded-answer path must enter the governed ask-time multimodal refresh before any raw source inspection
      • use recommended_hybrid_targets as the only legal query-aware narrowing entrypoint
      • if the turn becomes a waiter on that governed refresh, keep the same turn paused and reuse the shared result
      • once the governed refresh picks a source, complete that source's current hybrid candidates, inspect listed render or focus-render assets when present and answer-relevant, reretrieve, and retrace before treating the ask as ready to answer
      • record lightweight settlement audit fields such as render_inspection_used and inspected_render_assets when the work packet exposes visual assets
      • after one covered refresh and post-refresh retrieve/trace, close honestly with the remaining support boundary instead of starting a second same-turn refresh
      • if the governed refresh settles blocked, close the turn as abstained + governed-boundary
  5. Run provenance tracing for the strongest support when you need corroboration, contradiction checks, or answer-state clarification:
    • docmason trace --source-id <source_id> --json --compact
    • docmason trace --answer-file <path> --json --compact
    • docmason trace --session-id <session_id> --json --compact
    • if you truly need nested segment support objects, redirect full --json to a local file and inspect it selectively instead of loading the full raw trace payload into the live chat context
    • treat compact trace as the stable host-facing projection; inspect answer_state, reference_resolution, source_scope_policy, issue_codes, and recommended_hybrid_targets before reaching for nested JSON
    • when the same live turn creates more than one ask-owned retrieve session or more than one plausible final trace candidate, keep an explicit artifact ledger while you work:
      • preserve the selected ask-owned session_ids that support the final answer
      • preserve the selected trace_ids that bind the final answer-file version
      • return those selected IDs to the main agent for finalize-time use instead of leaving commit-time disambiguation to complete_ask_turn()
    • if the turn produced only one ask-owned retrieve session and one final trace, ordinary automatic hydration remains sufficient
  6. Inspect renders when:
    • the strongest support uses low-confidence extracted text
    • a cited unit has little or no text but does have rendered evidence
    • layout, tables, diagrams, screenshots, or visual style are part of the answer boundary
    • the odd-question plan explicitly prefers render or media
    • artifact supports expose render_page_span, bbox, or normalized_bbox that materially narrow what must be checked
    • artifact or segment supports expose focus_render_assets, which should be preferred over full-page renders when present
    • do not treat every multimodal source as a reason to reopen the raw file; render inspection is for questions whose answer boundary actually depends on visual semantics or a published render-only gap
  7. Draft the canonical answer file under runtime/answers/ when conversation context exists.
    • if you need auxiliary drafts or exported scratch artifacts and the user did not specify a path, place them under runtime/agent-work/
  8. When the answer is externally verified, persist the lightweight external support manifest before or alongside the final trace so the combined support contract stays machine-readable.
  9. Run docmason trace --answer-file <path> --json --compact as the final grounding check.
    • when the answer depends on artifact-level support, inspect compact trace fields first:
      • supporting_artifact_ids
      • segment supporting_artifact_ids
      • segment supporting_overlay_unit_ids
      • segment support-lane counts and compact support counts
    • when you genuinely need nested artifact_supports, semantic_supports, render refs, page spans, or region boxes, inspect a file-first full trace capture or the published artifact surfaces rather than streaming the nested trace payload into chat
    • hand the same answer-file path, plus any selected session_ids / trace_ids, back for hidden finalize; prefer the structured workflow_outcome handoff when the workflow already knows the correct support_basis, selected IDs, or other finalize-owned facts
    • if finalize returns status = execute together with a repairable support_fulfillment, do one contract-aware rewrite and retrace on the same turn, then finalize once more
    • if finalize returns status = execute together with admissibility_repair, use its issue codes and suggested action to rewrite the same answer file, rerun trace, and finalize once more
    • do not render terminal closure metadata yourself; return the exact business answer and workflow-owned support facts to ask, which alone decides whether a separate status line or boundary explanation is user-visible
  10. Emit one of these final answer states:
Show full SKILL.md (303 more words)Show less
  • grounded
  • partially-grounded
  • unresolved
  • abstained
  1. Return the final answer, final answer_state, overall support_basis, support boundary, and next steps to the main agent.

Escalation Rules

  • If the final answer trace returns partially-grounded or unresolved, do not relabel the result as grounded.
  • If the answer is externally verified or intentionally based on stable model knowledge, do not relabel it as a degraded product failure solely because the final answer is not KB-grounded.
  • If the final answer trace still requires render inspection, inspect the cited renders before issuing a confident answer.
  • If the evidence is contradictory, ambiguous, or insufficient, qualify the answer or abstain.
  • If source-reference resolution only succeeded approximately, do not phrase the answer as though the cited document or locator was matched exactly.
  • If the answer is comparative, do not finalize it from a support set dominated by one source when the trace or retrieval payload still shows weak comparative coverage.
  • Treat trace grounding_reason_codes and coverage ratios as diagnostics for repair and explanation. They do not override the final answer_state.
  • Do not treat retrieval alone as a complete grounded-answer workflow.
  • If published KB artifacts already satisfy the required evidence channels, do not rerender source files or rummage through original_doc/ as a first reflex.

Completion Signal

  • The workflow is complete when the main agent has a final answer text, a final answer state, and an explicit support or uncertainty boundary grounded in retrieval and trace results.

Notes

  • This is an inner agent-facing workflow behind ask. It is not a new public docmason answer command.
  • New runtime artifacts use the same four-state answer_state contract:
    • grounded
    • partially-grounded
    • unresolved
    • abstained
  • support_basis remains an explicit orthogonal field. Interpret answer_state relative to that declared support basis.
  • When a narrower KB-specific grounding view is needed, use trace grounding summaries, segment grounding statuses, and kb_answer_state rather than overloading the top-level answer contract.

© JetXu-LLM, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/canonical/grounded-answer of JetXu-LLM/DocMason.

  • SKILL.md
  • workflow.json

Open the folder on GitHubat commit 362417b

Compare with similar skills

Grounded Answer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Grounded Answer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Grounded Answer this skillJetXu-LLM/DocMason147—~3.1kAutomated safety check: PassApache-2.0
Logseq Review Workflow Evallogseq/logseq45k—~1kAutomated safety check: PassAGPL-3.0
Baoyu URL To Markdownsdyckjq-lab/llm-wiki-skill2.5k2 repos~3.2kAutomated safety check: PassNone
Obsidian CLIAtmosphere/atmosphere3.8k13 repos~795Automated safety check: PassApache-2.0
Esm Cjs Risk Scanlogseq/logseq45k—~3.3kAutomated safety check: PassAGPL-3.0
Capture Conversationoutline/outline41k—~474Automated safety check: PassCustom licence

Similar skills

  • Compare two revisions of the Logseq logseq-review-workflow skill by running the same review prompt against isolated before and after skill snapshots, collecting both outputs, and producing a…

    45k GitHub stars~1k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Baoyu URL To Markdown

    sdyckjq-lab/llm-wiki-skill

    Fetch any URL and convert to markdown using Chrome CDP. An agent skill from sdyckjq-lab/llm-wiki-skill.

    2.5k GitHub starsUsed in 2 repos~3.2k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian CLI

    Atmosphere/atmosphere

    Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more.

    3.8k GitHub starsUsed in 13 repos~795 tokens
    Knowledge ManagementAuto-check passed
  • Esm Cjs Risk Scan

    logseq/logseq

    Scan Logseq ClojureScript Node/Electron targets for npm module loading risks, especially ESM-only packages that may fail when loaded through js/require or shadow-cljs require-based shims.

    45k GitHub stars~3.3k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Capture Conversation

    outline/outline

    Save the current conversation, a decision, or a set of notes as a document in an Outline collection; use when the user wants to keep what was discussed in their knowledge base.

    41k GitHub stars~474 tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Karpathy LLM Wiki

    Astro-Han/karpathy-llm-wiki

    A skill your agent uses when building or maintaining a personal LLM-powered knowledge base.

    2.4k GitHub stars~3.6k tokensUpdated 2 mo ago
    Knowledge ManagementAuto-check passed

More from JetXu-LLM/DocMason

All 15 skills in this repo
  • Ask

    JetXu-LLM/DocMason

    Accept an ordinary user question inside a DocMason workspace, route it to the right inner workflow, and preserve conversation-native logs automatically.

    147 GitHub stars~7.1k tokensUpdated 9 days ago
    Auto-check passed
  • Adapter Sync

    JetXu-LLM/DocMason

    Generate or refresh the local Claude adapter surface for DocMason from canonical committed sources.

    147 GitHub stars~684 tokensUpdated 9 days ago
    Auto-check passed
  • Grounded Composition

    JetXu-LLM/DocMason

    Produce evidence-backed research, planning, drafting, or composition output from the published DocMason knowledge base while preserving provenance and answer-file discipline.

    147 GitHub stars~2.7k tokensUpdated 9 days ago
    Auto-check passed
  • Knowledge Base Sync

    JetXu-LLM/DocMason

    Stage, incrementally refresh, validate, and publish the DocMason knowledge base from the local source corpus.

    147 GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed
  • Knowledge Construction

    JetXu-LLM/DocMason

    Write bilingual Phase 3 knowledge objects for staged DocMason sources from rendered evidence and extracted structure.

    147 GitHub stars~1.8k tokensUpdated 9 days ago
    Auto-check passed
  • Operator Eval

    JetXu-LLM/DocMason

    Run the hidden operator-only evaluation loop over local runtime/eval artifacts without exposing that surface in normal first-contact workflows.

    147 GitHub stars~433 tokensUpdated 9 days ago
    Auto-check passed

Questions about Grounded Answer

What does Grounded Answer do?

Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check. Grounded Answer is an agent skill from JetXu-LLM/DocMason. Answer a user question through DocMason's canonical grounded workflow using retrieval, provenance tracing, render escalation, and a final answer-state check.

When should I use Grounded Answer?

Grounded Answer fits situations like: knowledge Management work in your project.

How do I install Grounded Answer in Claude Code?

Run `npx skills add JetXu-LLM/DocMason --skill grounded-answer -a claude-code`. Or copy the skill folder (skills/canonical/grounded-answer in JetXu-LLM/DocMason) into .claude/skills/grounded-answer in your project. Claude Code loads it when a task matches its description.

How do I install Grounded Answer in Codex?

Run `npx skills add JetXu-LLM/DocMason --skill grounded-answer -a codex`. Or copy the skill folder (skills/canonical/grounded-answer in JetXu-LLM/DocMason) into .agents/skills/grounded-answer in your project. Codex loads it when a task matches its description.

Can I use Grounded Answer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JetXu-LLM/DocMason --skill grounded-answer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/grounded-answer, .gemini/skills/grounded-answer, .github/skills/grounded-answer and .opencode/skills/grounded-answer in your project.

What does Grounded Answer need to run?

SKILL.md names no scripts, command-line tools or credentials: Grounded Answer is instructions for the agent only.

Does Grounded Answer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Grounded Answer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Grounded Answer use?

Grounded Answer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Grounded Answer use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Grounded Answer?

Skills that share tags, products or a category with Grounded Answer: Logseq Review Workflow Eval (logseq/logseq, 45k stars), Baoyu URL To Markdown (sdyckjq-lab/llm-wiki-skill, 2.5k stars), Obsidian CLI (Atmosphere/atmosphere, 3.8k stars) and Esm Cjs Risk Scan (logseq/logseq, 45k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Grounded Answer?

JetXu-LLM (a GitHub user) maintains it in JetXu-LLM/DocMason, which has 147 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 30, 2026.

Source: JetXu-LLM/DocMason on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.