Skip to content

Change Governance Protocol (CGP)

The Change Governance Protocol (CGP) provides built-in risk assessment and governance for release management, especially useful for AI-assisted and agentic workflows.

CGP automatically evaluates releases based on:

  • Blast radius: Number of files and lines changed
  • Actor trust: Who is making the change (human, CI, AI agent)
  • Security impact: Detection of security-related commits

CGP is disabled by default. Enable it in your relicta.config.yaml:

governance:
enabled: true
strict_mode: false
auto_approve_threshold: 0.3
max_auto_approve_risk: 0.5
require_human_for_breaking: true
require_human_for_security: true
memory_enabled: true
memory_path: .relicta/governance-memory.json
OptionTypeDefaultDescription
enabledboolfalseEnable CGP governance
strict_modeboolfalseBlock rejected releases at publish time
auto_approve_thresholdfloat0.3Risk score below which auto-approval is allowed
max_auto_approve_riskfloat0.5Maximum risk score for auto-approval
require_human_for_breakingbooltrueRequire human approval for breaking changes
require_human_for_securitybooltrueRequire human approval for security changes
memory_enabledbooltrueEnable release memory for historical tracking
memory_pathstring.relicta/governance-memory.jsonPath to store release memory

CGP calculates a risk score from 0.0 to 1.0 based on:

  • Number of files changed
  • Lines of code modified
  • Scope of changes across the codebase

Trust levels from lowest to highest:

  • untrusted: Unknown or unverified actors
  • limited: CI systems, bots with limited scope
  • trusted: Human developers, verified CI
  • full: Maintainers with full repository access

Security impact (90% weight when detected)

Section titled “Security impact (90% weight when detected)”

Automatically detects security-related commits via:

  • Scope patterns: security, auth, crypto, oauth, jwt, password, etc.
  • Keywords: CVE, vulnerability, XSS, injection, sanitize, etc.

Shows governance risk preview:

Terminal window
relicta plan --dry-run
# Output includes:
# Governance Risk Preview
# Risk Score: 38.0% (low)
# Decision: requires approval
# Auto-Approve: no (manual review required)
# Risk Factors:
# - [blast_radius] 18 files changed (30%)
# - [security_impact] 8 security-related changes (90%)

Shows full governance evaluation:

Terminal window
relicta approve
# Output includes:
# Governance Evaluation
# Risk Score: 38.0% (LOW)
# Decision: approval_required
# Required Actions:
# - [human_approval] Review security changes before release

In strict mode, blocks rejected releases:

Terminal window
relicta publish
# If governance.strict_mode=true and decision=rejected:
# ✗ Release blocked by governance policy
DecisionDescription
approvedRelease can proceed automatically
approval_requiredHuman review required before release
rejectedRelease should not proceed
deferredDecision postponed for further review

When memory_enabled: true, CGP tracks:

  • Past releases and their outcomes
  • Incidents and rollbacks
  • Actor behavior over time
  • Risk patterns for continuous improvement

The memory file is stored at memory_path (default: .relicta/governance-memory.json).

When AI agents propose releases, CGP ensures human oversight:

  • Agent-initiated changes require approval above threshold
  • Security changes always require human review
  • High-risk changes are flagged for manual inspection

CGP integrates with automated pipelines:

  • Low-risk, trusted CI releases can auto-approve
  • Breaking changes pause for human review
  • Audit trail maintained for compliance

Define policies for your team:

  • Require senior approval for major releases
  • Flag security changes for security team review
  • Track release patterns over time