retrieval-workflow
Skill152 starsChanged 4 months agoApache-2.0View on GitHub
Retrieve ranked evidence bundles from the published DocMason knowledge base.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- adapter-syncSkill
- askSkill
- grounded-answerSkill
- grounded-compositionSkill
- knowledge-base-syncSkill
- knowledge-constructionSkill
- provenance-traceSkill
- runtime-log-reviewSkill
- validation-repairSkill
- workspace-bootstrapSkill
- workspace-doctorSkill
- workspace-statusSkill
- operator-evalSkill
- public-sample-workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 9 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when the task is to retrieve the strongest published evidence bundles for a question or topic.
- Very specific: line 11
Use it directly for explicit evidence requests, or let ask route here automatically.
- Distinctive: line 22
If the agent cannot run local commands or inspect the published file-only knowledge base, stop and explain that reliable retrieval is not …
- Very specific: line 27
Run docmason retrieve "<query>" --json --compact for host-visible inspection.
- Very specific: line 28
when full nested unit or artifact detail is genuinely required, rerun full --json to a local file and inspect it selectively instead of …
- Distinctive: line 29
keep user-native source references inside the freeform query rather than inventing internal source IDs when the user already knows a file …
- Very specific: line 30
keep DocMason workspace commands sequential inside the same workspace session.
- Very specific: line 36
when exact artifact fields such as section_path, caption_text, continuation_group_ids, procedure_hints, or semantic_labels matter, inspect …
- Very specific: line 48
when reference_resolution.status is exact, expect the source filter and any exact unit targeting to have already narrowed the candidate set …
- Very specific: line 49
when reference_resolution.status is approximate but unit_match_status is exact, expect retrieval to narrow to the resolved source while …
- Very specific: line 50
when reference_resolution.status is approximate or unresolved, preserve the notice boundary rather than pretending the narrowing was exact
- Distinctive: line 52
If the strongest results are weak or empty, say so explicitly instead of pretending the query succeeded.
- Very specific: line 55
When the task is moving toward a final answer or deliverable draft, return retrieval bundles to the main agent for provenance tracing, …
- Very specific: line 56
If you need to export a scratch evidence note and the user did not specify a destination, place it under runtime/agent-work/.
- Distinctive: line 60
If retrieval returns no results, surface that boundary directly and consider narrower or alternate queries only when they remain faithful …
- Distinctive: line 61
If render references or low-confidence extraction suggest visual confirmation is required, escalate to render inspection or provenance …
- Very specific: line 62
If the retrieval result already shows that the preferred published evidence channels are sufficient, do not jump back to original_doc/ as a …
- Distinctive: line 63
If the retrieval result says published artifacts are insufficient because of hard-artifact semantic gaps, prefer the workflow-level hybrid …
- Very specific: line 64
If recommended_hybrid_targets is non-empty, use that packet as the narrowed governed multimodal refresh starting point rather than …
- Very specific: line 65
If a soft document alias is present but richer artifact-bearing evidence ranks elsewhere, do not assume the alias should hard-filter the …
- Distinctive: line 79
If the strongest evidence depends on renders or low-confidence text extraction, inspect the render assets before finalizing the answer.
- Distinctive: line 81
When direct operator retrieval runs inside an active native thread without canonical ask ownership, treat the result as operator evidence …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Retrieval Workflow
Use this skill when the task is to retrieve the strongest published evidence bundles for a question or topic.
This is an evidence-focused workflow.
Use it directly for explicit evidence requests, or let ask route here automatically.
Direct public retrieve remains a legal operator evidence surface.
It does not substitute for canonical ask when the user is really asking for ordinary answer completion.
Required Capabilities
- local file access
- shell or command execution
- ability to inspect structured JSON output
If the agent cannot run local commands or inspect the published file-only knowledge base, stop and explain that reliable retrieval is not possible.
Procedure
- Confirm that the published knowledge base exists with
docmason status --jsonwhen needed. - Run
docmason retrieve "<query>" --json --compactfor host-visible inspection.- when full nested unit or artifact detail is genuinely required, rerun full
--jsonto a local file and inspect it selectively instead of streaming the raw payload into the live chat context - keep user-native source references inside the freeform query rather than inventing internal source IDs when the user already knows a file name, path, page, slide, sheet, or heading
- keep DocMason workspace commands sequential inside the same workspace session; do not overlap
retrieve,trace,sync,status, orvalidate-kbwhile a lease-owning command is still active
- when full nested unit or artifact detail is genuinely required, rerun full
- Inspect:
reference_resolution- ranked source bundles
- compact bundle fields such as
matched_unit_ids,matched_artifact_ids,matched_overlay_unit_ids, and collection counts - artifact-aware score details such as
structure_context_bonus,semantic_overlay_bonus, andcompare_coverage_bonus - when exact artifact fields such as
section_path,caption_text,continuation_group_ids,procedure_hints, orsemantic_labelsmatter, inspect a file-first full JSON capture or the published artifact sidecars rather than dumping the full raw payload into chat focus_render_assetswhen presentrecommended_hybrid_targetswhen the published artifact plan still reports a hard-artifact semantic gap- graph-expansion summary fields
- render references when relevant
- any published-evidence plan fields such as preferred channels, matched channels, and whether published artifacts already look sufficient
- for image-only or scanned PDF questions, check whether
page-imageartifacts or unitsemantic_gap_hintsare present before assuming the KB has enough semantics already
- Narrow or widen the query by:
--document-type--source-id--top--graph-hops- when
reference_resolution.statusisexact, expect the source filter and any exact unit targeting to have already narrowed the candidate set decisively - when
reference_resolution.statusisapproximatebutunit_match_statusisexact, expect retrieval to narrow to the resolved source while still preserving the approximate notice - when
reference_resolution.statusisapproximateorunresolved, preserve the notice boundary rather than pretending the narrowing was exact - for artifact-hint or compare-style questions, prefer reformulations that keep the named table, chart, diagram, caption, or compared objects explicit
- If the strongest results are weak or empty, say so explicitly instead of pretending the query succeeded.
- For compare-style retrieval, verify that more than one source survives the top support set before calling the bundle comparison-ready.
- Open the cited source, unit, artifact, and render assets before claiming confidence on difficult evidence judgments.
- When the task is moving toward a final answer or deliverable draft, return retrieval bundles to the main agent for provenance tracing,
grounded-answer, orgrounded-composition. - If you need to export a scratch evidence note and the user did not specify a destination, place it under
runtime/agent-work/.
Escalation Rules
- If retrieval returns no results, surface that boundary directly and consider narrower or alternate queries only when they remain faithful to the user intent.
- If render references or low-confidence extraction suggest visual confirmation is required, escalate to render inspection or provenance trace before final synthesis.
- If the retrieval result already shows that the preferred published evidence channels are sufficient, do not jump back to
original_doc/as a first move. - If the retrieval result says published artifacts are insufficient because of hard-artifact semantic gaps, prefer the workflow-level hybrid enrichment path before source-level fallback.
- If
recommended_hybrid_targetsis non-empty, use that packet as the narrowed governed multimodal refresh starting point rather than inventing your own source or artifact subset. - If a soft document alias is present but richer artifact-bearing evidence ranks elsewhere, do not assume the alias should hard-filter the query. Check the
reference_resolutionnotice and the actual ranked artifacts together. - Retrieval alone is not the grounded-answer contract. Do not present retrieval output as a fully supported final answer.
- Public
retrievenow does implicit source-reference parsing, but publictracestill remains ID-first in this phase.
Completion Signal
- The workflow is complete when the main agent has either a ranked grounded evidence bundle or an explicit no-results boundary with concrete next steps.
Notes
- Retrieval runs over
knowledge_base/current/by default. - Phase 4 retrieval is deterministic lexical plus metadata plus graph expansion. It does not use embeddings yet.
- Retrieval logs are stored locally under
runtime/logs/. --jsonoutput always includes a structuredreference_resolutionblock, and normal CLI output echoes the resolution status plus any best-effort notice.- If the strongest evidence depends on renders or low-confidence text extraction, inspect the render assets before finalizing the answer.
- Ordinary natural questions should usually begin at
ask, not by requiring the user to name this workflow ID. - When direct operator retrieval runs inside an active native thread without canonical ask ownership, treat the result as operator evidence only rather than as proof that ordinary ask already executed legally.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

