agentleFS
JetXu-LLMJetXu-LLM/DocMason/skills/canonical/provenance-trace/SKILL.md

provenance-trace

Skill152 starsChanged 4 months agoApache-2.0View on GitHub

Trace published DocMason knowledge objects or answer text back to evidence units and provenance records.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 5 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the task is to prove where a knowledge object or answer came from.

    line 8
  2. Very specific:

    Use it directly for explicit provenance or citation requests, or let ask route here automatically.

    line 10
  3. Distinctive:

    If the agent cannot inspect the local trace artifacts or source evidence, stop and explain that reliable provenance tracing is not possible.

    line 21
  4. Very specific:

    Use current as the default knowledge-base target unless the task explicitly says otherwise.

    line 25
  5. Very specific:

    if you genuinely need nested support objects or detailed render metadata, rerun full --json to a local file and inspect it selectively …

    line 29
  6. Very specific:

    keep DocMason workspace commands sequential inside the same workspace session.

    line 30
  7. Very specific:

    do not invent a new freeform --source-ref surface in this phase.

    line 34
  8. Very specific:

    if the provenance judgment depends on nested artifact_supports, semantic_supports, overlay consumed inputs, covered slots, blocked slots, …

    line 52
  9. Distinctive:

    If any segment is only partially grounded or unresolved, say so explicitly and avoid pretending stronger provenance than the trace supports.

    line 53
  10. Very specific:

    If you need to export a scratch trace note and the user did not specify a destination, place it under runtime/agent-work/.

    line 55
  11. Very specific:

    If render_inspection_required is true, inspect the cited render assets before claiming a confident conclusion.

    line 59
  12. Distinctive:

    If the trace cannot resolve the requested source, session, or answer path, surface the not-found failure directly.

    line 60
  13. Very specific:

    If the traced answer state is not grounded, qualify or abstain rather than overclaiming support.

    line 61
  14. Very specific:

    If answer-first trace inherits an approximate or unresolved reference-resolution block, preserve that boundary in the provenance summary …

    line 62
  15. Distinctive:

    When a trace says render inspection is needed, inspect the render assets before claiming a confident conclusion.

    line 74

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Provenance Trace

Use this skill when the task is to prove where a knowledge object or answer came from.

Use it directly for explicit provenance or citation requests, or let ask route here automatically.

Direct public trace remains a legal operator provenance 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 inspect the local trace artifacts or source evidence, stop and explain that reliable provenance tracing is not possible.

Procedure

  1. Use current as the default knowledge-base target unless the task explicitly says otherwise.
  2. For citation-first tracing, run:
    • docmason trace --source-id <source_id> --json --compact
    • optionally add --unit-id <unit_id> for unit-level detail
    • if you genuinely need nested support objects or detailed render metadata, rerun full --json to a local file and inspect it selectively instead of pasting the raw payload into chat
    • keep DocMason workspace commands sequential inside the same workspace session; do not overlap trace, retrieve, sync, status, or validate-kb while a lease-owning command is still active
  3. For answer-first tracing, run:
    • docmason trace --answer-file <path> --json --compact
    • or docmason trace --session-id <session_id> --json --compact
    • do not invent a new freeform --source-ref surface in this phase; public trace remains ID-first
  4. Inspect:
    • payload_detail
    • any inherited reference_resolution block on answer-first traces
    • answer_state
    • source provenance
    • unit consumers
    • incoming and outgoing relations
    • grounding status for each answer segment
    • compact supporting_source_ids
    • compact supporting_unit_ids
    • supporting_artifact_ids
    • supporting_overlay_unit_ids
    • segment support_lane_counts
    • segment artifact_support_count
    • segment semantic_support_count
    • artifact focus_render_assets when present
    • render-inspection requirements
    • if the provenance judgment depends on nested artifact_supports, semantic_supports, overlay consumed inputs, covered slots, blocked slots, render refs, render_page_span, bbox, normalized_bbox, or sidecar paths, inspect a file-first full trace capture instead of the raw chat payload
  5. If any segment is only partially grounded or unresolved, say so explicitly and avoid pretending stronger provenance than the trace supports.
  6. Return the final provenance or groundedness judgment to the main agent instead of treating trace output as a final user answer by itself.
  7. If you need to export a scratch trace note and the user did not specify a destination, place it under runtime/agent-work/.

Escalation Rules

  • If render_inspection_required is true, inspect the cited render assets before claiming a confident conclusion.
  • If the trace cannot resolve the requested source, session, or answer path, surface the not-found failure directly.
  • If the traced answer state is not grounded, qualify or abstain rather than overclaiming support.
  • If answer-first trace inherits an approximate or unresolved reference-resolution block, preserve that boundary in the provenance summary instead of silently upgrading it.

Completion Signal

  • The workflow is complete when the main agent has a clear provenance summary, including any answer_state, unresolved segments, and render-escalation requirements.

Notes

  • Phase 4 tracing reads knowledge_base/current/trace/ by default.
  • Answer-first tracing stores structured local logs under runtime/logs/.
  • --session-id works only for sessions that contain a reusable final answer.
  • In Phase 6b2, answer-first trace reuses the same shared reference-resolution contract already attached to the originating ask turn or retrieval session.
  • When a trace says render inspection is needed, inspect the render assets before claiming a confident conclusion.
  • Ordinary natural questions should usually begin at ask, which can route here when provenance is the real intent.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.