Aiwg provenance-validate
Validate provenance records and chains for completeness and consistency
install
source · Clone the upstream repo
git clone https://github.com/jmagly/aiwg
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/jmagly/aiwg "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.agents/skills/provenance-validate" ~/.claude/skills/jmagly-aiwg-provenance-validate && rm -rf "$T"
manifest:
.agents/skills/provenance-validate/SKILL.mdsource content
Provenance Validate Command
Validate provenance records against the PROV schema and verify chain integrity.
Instructions
When invoked, validate provenance:
-
Load records
- Scan
for all.aiwg/research/provenance/records/
files.prov.yaml - If specific path provided, validate only that record
- Scan
-
Schema validation
- Validate each record against
@$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/schemas/provenance/prov-record.yaml - Check required fields: entity.id, activity.id, agent.id
- Verify URN format compliance
- Verify timestamps are valid ISO-8601
- Validate each record against
-
Entity resolution
- For each entity URN, verify the referenced file exists
- Flag orphaned records (file deleted but provenance remains)
- Detect untracked artifacts (files in tracked directories without provenance)
-
Chain integrity
- Verify wasDerivedFrom sources exist and have their own provenance
- Check bidirectional links (forward references have matching back-references)
- Detect broken chains (missing intermediate records)
-
Completeness check
- Scan
directories for artifacts without provenance records.aiwg/ - Calculate coverage percentage
- List untracked artifacts
- Scan
-
Fix mode (--fix)
- Remove orphaned provenance records
- Create stub records for untracked artifacts
- Add missing bidirectional references
-
Report
- Display validation results table
- Show pass/fail/warning counts
- List specific issues with remediation steps
Arguments
- Specific record or directory to validate (default: all records)[path]
- Validate all records and check completeness--all
- Treat warnings as errors--strict
- Auto-fix issues where possible--fix
- Save validation report to file--report [path]
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/rules/provenance-tracking.md - Provenance tracking rules