Back to .md Directory

ProvenanceCode CLI - v2.0 Standard Compliance ✅

Declares full compliance of the ProvenanceCode CLI with the v2.0 standard, listing schema changes, ID formats, and backward compatibility.

May 2, 2026
0 downloads
0 views
ai
View source

What this file does

Declares full compliance of the ProvenanceCode CLI with the v2.0 standard, listing schema changes, ID formats, and backward compatibility.

When to use it

  • Adopting the ProvenanceCode v2.0 standard in your CLI tool
  • Migrating from v1.0 to v2.0 schema identifiers and ID formats
  • Adding monorepo or Jira integration support to your CLI
  • Validating your CLI against the official v2.0 compliance checklist

Assumes this stack

ProvenanceCode CLI

ProvenanceCode CLI - v2.0 Standard Compliance ✅

Overview

The ProvenanceCode CLI is now fully compliant with the official ProvenanceCode v2.0 standard.

✅ Compliance Checklist

Schema Identifiers

  • Decision schema: provenancecode.decision.v2 (was: https://provenancecode.org/schemas/decision.g2.schema.json)
  • Risk schema: provenancecode.risk.v2 (was: https://provenancecode.org/schemas/risk.g2.schema.json)
  • ✅ Backward compatible with old schema URLs

ID Format

  • Decision IDs: DEC-{PROJECT}-{SUBPROJECT}-{SEQ6}
    • Example: DEC-SHOP-FE-000001
    • Pattern: ^DEC-[A-Z0-9]{2,4}-[A-Z0-9]{2,4}-[0-9]{6}$
  • Risk IDs: RA-{PROJECT}-{SUBPROJECT}-{SEQ6} (uses RA prefix per standard)
    • Example: RA-SHOP-SEC-000001
    • Pattern: ^RA-[A-Z0-9]{2,4}-[A-Z0-9]{2,4}-[0-9]{6}$
  • Project code: 2-4 uppercase characters (A-Z, 0-9)
  • Subproject code: 2-4 uppercase characters (A-Z, 0-9)

Configuration Files

codes.json ✅

Standard registry file created at provenance/codes.json:

{
  "schema": "provenancecode.codes@1.0",
  "version": "1.0",
  "monorepo": false,
  "projects": {
    "SHOP": {
      "name": "SHOP",
      "subprojects": {
        "FE": {
          "name": "FE",
          "workspace": "."
        }
      }
    }
  }
}

Features:

  • Auto-created on prvc install
  • Auto-updated when setting project/subproject via prvc config
  • Supports monorepo configuration
  • Validates project/subproject code format (2-4 chars)

sequences.json ✅

Standard tracking file created at provenance/sequences.json:

{
  "schema": "provenancecode.sequences@1.0",
  "version": "1.0",
  "sequences": {}
}

Features:

  • Auto-created on prvc install
  • Tracks sequence numbers per PROJECT-SUBPROJECT-ARTIFACT_TYPE
  • Prevents ID conflicts

Schema Fields

Decision Schema (v2.0) ✅

New v2.0 fields added:

{
  "schema": "provenancecode.decision.v2",
  "decision_id": "DEC-SHOP-FE-000001",
  
  "project": {
    "code": "SHOP",
    "name": "Shop Application",
    "jiraProject": "SHOP"
  },
  
  "subproject": {
    "code": "FE",
    "name": "Frontend",
    "workspace": "apps/frontend",
    "jiraComponent": "Frontend"
  },
  
  "context": {
    "problem": "What problem are we solving?",
    "constraints": ["Technical constraints"]
  },
  
  "links": {
    "pr": "https://github.com/org/repo/pull/123",
    "jira": "https://company.atlassian.net/browse/SHOP-123"
  },
  
  "timestamps": {
    "created_at": "2026-02-16T00:00:00Z",
    "updated_at": "2026-02-16T00:00:00Z"
  }
}

Backward compatibility:

  • ✅ Old v1.0 string format for context still valid
  • ✅ Old array format for links still valid
  • ✅ Old date_created/date_updated fields still supported

Risk Schema (v2.0) ✅

New v2.0 fields added:

{
  "schema": "provenancecode.risk.v2",
  "risk_id": "RA-SHOP-SEC-000001",
  
  "project": {
    "code": "SHOP",
    "name": "Shop Application"
  },
  
  "subproject": {
    "code": "SEC",
    "name": "Security",
    "workspace": "packages/security"
  },
  
  "timestamps": {
    "created_at": "2026-02-16T00:00:00Z",
    "updated_at": "2026-02-16T00:00:00Z"
  }
}

Monorepo Support ✅

Full v2.0 monorepo support:

# Configure monorepo
prvc config monorepo --roots="apps/frontend,apps/backend,packages/shared"

codes.json with monorepo:

{
  "schema": "provenancecode.codes@1.0",
  "monorepo": true,
  "projects": {
    "PLATFORM": {
      "subprojects": {
        "FE": {
          "workspace": "apps/frontend",
          "paths": ["apps/frontend/**"]
        },
        "BE": {
          "workspace": "apps/backend",
          "paths": ["apps/backend/**"]
        }
      }
    }
  }
}

Jira Integration Support ✅

Schema supports Jira integration:

  • project.jiraProject field
  • subproject.jiraComponent field
  • links.jira for ticket URLs

Example with Jira:

{
  "decision_id": "DEC-SHOP-FE-000001",
  "project": {
    "code": "SHOP",
    "jiraProject": "SHOP"
  },
  "subproject": {
    "code": "FE",
    "jiraComponent": "Frontend"
  },
  "links": {
    "jira": "https://company.atlassian.net/browse/SHOP-123"
  }
}

🔄 Backward Compatibility

The CLI maintains full backward compatibility:

v1.0 Format Still Valid ✅

{
  "schema": "https://provenancecode.org/schemas/decision.g2.schema.json",
  "decision_id": "DEC-000001",
  "title": "Old format decision",
  "status": "draft"
}

The CLI will:

  • ✅ Validate v1.0 format
  • ⚠️ Warn that v2.0 schema identifier is preferred
  • ✅ Accept both formats in same repository

Mixed Formats Supported ✅

A repository can contain:

  • v1.0 decisions: DEC-000001
  • v2.0 decisions: DEC-SHOP-FE-000001
  • Both coexisting peacefully

📊 Changes Summary

FeatureBeforeAfter (v2.0)
Schema IDURL-basedStandard identifier
Decision IDDEC-{APP}-{AREA}-{SEQ6}DEC-{PROJECT}-{SUBPROJECT}-{SEQ6}
Risk IDRSK-{APP}-{AREA}-{SEQ6}RA-{PROJECT}-{SUBPROJECT}-{SEQ6}
Code formatAny length2-4 chars (validated)
codes.json❌ Not created✅ Auto-created
sequences.json❌ Not created✅ Auto-created
MonorepoBasic supportFull v2.0 support
JiraNot in schemaSchema supports

🧪 Testing Results

Install Command ✅

✓ Creates provenance/ structure
✓ Creates codes.json with correct schema
✓ Creates sequences.json with correct schema
✓ Templates use v2.0 schema identifiers
✓ Config uses v2.0 standard

Config Command ✅

✓ Validates project code format (2-4 chars)
✓ Validates subproject code format (2-4 chars)
✓ Auto-updates codes.json registry
✓ Creates projects and subprojects automatically

Validation ✅

✓ Validates v2.0 ID format
✓ Validates v2.0 schema identifiers
✓ Warns on old schema URLs
✓ Still accepts v1.0 format

📚 References

✅ Compliance Statement

The ProvenanceCode CLI is fully compliant with the ProvenanceCode v2.0 standard as published at provenancecode.github.io.

All features, formats, and behaviors align with the official specification while maintaining backward compatibility with v1.0.


Last Updated: 2026-02-17
Standard Version: v2.0
CLI Version: 1.0.0

What's inside

8 sections covering schema identifiers, ID formats, configuration files, schema fields, monorepo support, Jira integration, backward compatibility, and testing results.

Change this for your project

  • Replace SHOP with your actual project code
  • Replace FE with your actual subproject code
  • Replace https://company.atlassian.net/browse/SHOP-123 with your Jira ticket URL
  • Replace apps/frontend with your actual workspace paths

Where it goes

Save as AGENTS.md in your repository root. Read by Codex, Cursor and other agents that follow the AGENTS.md convention.

Worth borrowing

  • Maintain a compliance checklist that maps each standard requirement to a concrete implementation detail
  • Provide backward compatibility by accepting both old and new formats with warnings

Related Documents