provenance-query
Query provenance chains to trace artifact derivation and impact
Best use case
provenance-query is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
It is a strong fit for teams already working in Codex.
Query provenance chains to trace artifact derivation and impact
Teams using provenance-query should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/provenance-query/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How provenance-query Compares
| Feature / Agent | provenance-query | Standard Approach |
|---|---|---|
| Platform Support | Codex | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Query provenance chains to trace artifact derivation and impact
Which AI agents support this skill?
This skill is designed for Codex.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# Provenance Query Command Query provenance chains to understand artifact derivation, impact, and attribution. ## Instructions When invoked, query provenance graph: 1. **Load provenance graph** - Read all records from `.aiwg/research/provenance/records/` - Build in-memory graph of entity relationships - Index by entity URN for fast lookup 2. **Execute query** (based on subcommand) **trace** - Full derivation chain for an artifact: - Follow wasDerivedFrom relationships backward to root sources - Display as indented tree showing derivation types - Include depth limiting with `--depth` **impact** - What depends on this artifact: - Follow wasDerivedFrom relationships forward - Show all artifacts that derive from the queried artifact - Useful for understanding change impact **orphans** - Find artifacts without provenance: - Scan `.aiwg/` and `src/` for files - Compare against provenance records - List untracked artifacts **agents** - Show agent attribution: - Group provenance records by agent - Show what each agent created/modified - Include activity counts and timestamps 3. **Format output** - Default: indented tree - `--format table`: Markdown table - `--format mermaid`: Mermaid diagram - `--format json`: Raw JSON 4. **Display results** - Show query results - Include summary statistics ## Subcommands - `trace [path]` - Full derivation chain for artifact - `impact [path]` - What depends on this artifact - `orphans` - Find artifacts without provenance - `agents` - Show agent attribution summary ## Arguments - `[artifact-path]` - Path to artifact (required for trace/impact) - `--direction [forward|backward|both]` - Traversal direction (default: both) - `--depth [n]` - Maximum traversal depth (default: unlimited) - `--format [tree|table|mermaid|json]` - Output format (default: tree) ## References - @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/agents/provenance-manager.md - Provenance Manager agent - @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/provenance/prov-record.yaml - PROV record schema - @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/provenance/prov-query.yaml - Query schema - @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/provenance-tracking.md - Provenance tracking rules
Related Skills
Provenance Tracking
W3C PROV-O patterns for tracking media derivation chains and production history
rlm-query
Spawn sub-agent to process focused context and return structured result
research-query
Search the local research corpus, read matching findings, and synthesize an answer with inline citations to REF-XXX sources. The "query" operation for the research pipeline.
research-provenance
Query provenance chains and artifact relationships
provenance-validate
Validate provenance records and chains for completeness and consistency
provenance-report
Generate provenance coverage dashboard and statistics
provenance-create
Create a W3C PROV-compliant provenance record for an artifact
memory-query-capture
Capture query synthesis as durable pages in semantic memory
auto-provenance
Generate W3C PROV-compliant provenance records automatically when agents create or modify artifacts
aiwg-orchestrate
Route structured artifact work to AIWG workflows via MCP with zero parent context cost
venv-manager
Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.
pytest-runner
Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.