Provenance
Requirement and compliance traceability directly in code.
Embed structured annotations near the code they explain, then use the VS Code extension to highlight, search, aggregate, and warn on important traceability metadata.
Publisher page
Provenance is the first extension from Pedro Ribeiro: a lightweight annotation convention and VS Code experience for requirement, authorship, and compliance traceability.
# pvnc.req: USER-1092# pvnc.reason: Sugar threshold added# pvnc.dnc: HMRC compliance# pvnc.source: ai.claudeif order.category == "food" and order.sugar_content <= 2:Extensions
Requirement and compliance traceability directly in code.
Embed structured annotations near the code they explain, then use the VS Code extension to highlight, search, aggregate, and warn on important traceability metadata.
Why it exists
When an LLM helps with a codebase it has no institutional memory. It cannot know why a piece of code was written, what requirement drove it, or why an apparently redundant condition must not be removed.
Provenance keeps that context close to the implementation with a lightweight convention that works in any language with comments.
Annotation formats
Use <provenance> or the short alias
<pvnc> in a doc comment or string literal.
Each block is independent and can be stacked into a timeline.
<pvnc>
requirement: USER-1092 (jira, 2025-Q3)
reason: Sugar threshold added
do-not-change: HMRC compliance
source: ai.claude
</pvnc>
Use one comment line per key. Consecutive inline runs separated only by blank lines are grouped into a single annotation.
# pvnc.req: USER-1092
# pvnc.reason: High-sugar foods excluded
# pvnc.dnc: HMRC compliance
# pvnc.source: ai.claude
VS Code experience
Keys, requirement IDs, reason text, sources, and guard entries render distinctly.
The Provenance panel aggregates human, AI-authored, and unknown-source annotations.
Annotated lines show authorship markers: AI, human, mixed, or unspecified.
Opt-in file badges appear for opened, edited, or explicitly analyzed files.
Hovering surfaces full annotation content, including cross-references and timelines.
Guarded edits show a non-blocking warning so compliance-sensitive logic is intentional.
Key reference
| Field | Inline | Purpose |
|---|---|---|
| requirement | pvnc.req | Work item that drove this code |
| reason | pvnc.reason | Human-readable explanation |
| source | pvnc.source | Authorship: human or AI assistant |
| invariant | pvnc.inv | Rule that must never be violated |
| do-not-change | pvnc.dnc | Load-bearing complexity guard |
| see-also | pvnc.see | Related files or ticket IDs |
Configuration
{
"provenance.gutterIcons": true,
"provenance.explorerFileBadges": false,
"provenance.warnOnDoNotChange": true,
"provenance.guardedRangeLines": 30,
"provenance.ticketSystems": {
"jira": { "baseUrl": "https://yourcompany.atlassian.net", "apiToken": "" },
"ado": { "organisation": "yourorg", "pat": "" },
"github": { "owner": "your-org", "repo": "your-repo", "token": "" }
}
}
Supported languages
Python, TypeScript, JavaScript, Java, C#, C/C++, Rust, Go, Ruby, PHP, Kotlin, Swift, and any other language with line or block comments.