Audit AI code change evidence integrity
Prove that aggregate AI-assisted coding evidence comes from prospectively registered, nonoverlapping treatment/control studies with immutable assignment, configuration, trace and mature-outcome denominators before anyone estimates an effect.
What it's for
Gives leaders defensible evidence about AI coding outcomes before productivity claims, budget decisions or investor narratives are made.
What you give it
Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| as_of_ms | number ≥ 0 | Your calibration | Yes |
| max_detail_rows | integer ≥ 1, ≤ 500 | Numerical control | Optional |
| maximum_control_contamination | number ≥ 0, ≤ 1 | Your calibration | Optional |
| minimum_evidence_coverage | number ≥ 0, ≤ 1 | Your calibration | Optional |
| minimum_overlap_probability | number > 0, ≤ 0.5 | Your calibration | Optional |
| minimum_treatment_adherence | number ≥ 0, ≤ 1 | Your calibration | Optional |
| registered_studies | array of objects (10 fields) | Evidence | Yes |
| study_units | array of objects (17 fields) | Evidence | Yes |
Each study_units
record
| Field | Type | Required |
|---|---|---|
| aggregate_unit_id | string (non-empty) | Yes |
| assigned_ai_enabled | boolean | Yes |
| assigned_at_ms | number (≥ 0) | Yes |
| assignment_probability | number (≥ 0, ≤ 1) | Yes |
| eligible_change_count | integer (≥ 1) | Yes |
| evidence_verified | boolean | Yes |
| id | string (non-empty) | Yes |
| mature_eligible_change_count | integer (≥ 0) | Yes |
| metric_contract_hash | string (non-empty) | Yes |
| observation_ended_at_ms | number (≥ 0) | Yes |
| observation_started_at_ms | number (≥ 0) | Yes |
| observed_ai_configuration_hash | string (non-empty) | Yes |
| observed_ai_exposure_fraction | number (≥ 0, ≤ 1) | Yes |
| pre_assignment_snapshot_at_ms | number (≥ 0) | Yes |
| resolved_quality_outcome_count | integer (≥ 0) | Yes |
| study_id | string (non-empty) | Yes |
| trace_linked_change_count | integer (≥ 0) | Yes |
{
"as_of_ms": 10000,
"registered_studies": [
{
"ai_configuration_hash": "sha256:assistant-config-v3",
"assignment_level": "repository",
"ended_at_ms": 9000,
"evidence_verified": true,
"id": "ai-code-study-q3",
"metric_contract_hash": "sha256:quality-contract-v2",
"minimum_trace_coverage": 0.9,
"outcome_maturity_days": 0,
"randomization_verified": true,
"started_at_ms": 1000
}
],
"study_units": [
{
"aggregate_unit_id": "repository-treatment",
"assigned_ai_enabled": true,
"assigned_at_ms": 1500,
"assignment_probability": 0.5,
"eligible_change_count": 100,
"evidence_verified": true,
"id": "study-unit-treatment",
"mature_eligible_change_count": 100,
"metric_contract_hash": "sha256:quality-contract-v2",
"observation_ended_at_ms": 8000,
"observation_started_at_ms": 2000,
"observed_ai_configuration_hash": "sha256:assistant-config-v3",
"observed_ai_exposure_fraction": 0.9,
"pre_assignment_snapshot_at_ms": 1400,
"resolved_quality_outcome_count": 100,
"study_id": "ai-code-study-q3",
"trace_linked_change_count": 95
},
{
"aggregate_unit_id": "repository-control",
"assigned_ai_enabled": false,
"assigned_at_ms": 1500,
"assignment_probability": 0.5,
"eligible_change_count": 100,
"evidence_verified": true,
"id": "study-unit-control", Truncated for display — the full payload is 57 lines.
What you get back
This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.
{
"assumptions": [
"Studies are prospectively registered at aggregate team, repository or project grain; assignment and pre-treatment snapshots precede every observed change.",
"Tool exposure is measured from immutable runtime traces and exact configuration hashes; a license, seat, self-report or generated-code classifier is not treated as authorship or exposure proof.",
"Every eligible change remains in the denominator and every mature change has an explicit quality outcome, including zero defects and zero rework."
],
"counts": {
"aggregate_units": 2,
"overlapping_unit_windows": 0,
"registered_studies": 1,
"study_units": 2
},
"decision": "ai_code_effect_evidence_ready_for_causal_analysis",
"evidence": {
"gate_pass": true,
"minimum_required_fraction": 0.95,
"verified_fraction": 1
},
"integrity_pass": true,
"limitations": [
"Passing establishes data/design integrity, not a causal effect; estimation still needs the registered design, cluster/interference handling, uncertainty and out-of-time validation.",
"The audit concerns aggregate study units and cannot infer individual productivity, code authorship, intent, misconduct, hidden employment or employment suitability."
],
"method": "prospective_aggregate_ai_code_study_integrity_audit_v1",
"overlap_diagnostics": [],
"study_diagnostics": [
{
"assignment_level": "repository",
"failed_gates": [],
"represented_arms": [
"control",
"ai_enabled"
],
"study_id": "ai-code-study-q3"
}
],
"study_unit_diagnostics": [
{
"aggregate_unit_id": "repository-treatment",
"assigned_ai_enabled": true,
"assignment_probability": 0.5,
"failed_gates": [],
"mature_outcome_coverage": 1,
"observed_ai_exposure_fraction": 0.9, Truncated for display — the full payload is 62 lines.
How it works
Causal inference & experiment design — Separate what a change caused from what merely moved alongside it.
- 1 Reconcile each aggregate team, repository or project study unit to a prospectively registered design, exact AI configuration and immutable metric contract.
- 2 Verify pre-treatment snapshots, assignment timing and overlap, treatment adherence, control contamination, complete eligible-change tracing and mature zero-inclusive quality outcomes.
- 3 Block causal analysis when either arm is missing, windows overlap or evidence gates fail; emit bounded diagnostics without attributing AI authorship to a person or line of code.
Before you trust it
Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.
Assumptions & guardrails
- Assignment or adoption timing, interference policy, overlap, attrition, and outcome availability match the estimand encoded by the method.
- Assignment probabilities were recorded before outcomes, aggregate units are the registered unit of inference, interference is handled and AI exposure comes from immutable runtime traces.
- A causal label is warranted only when design and diagnostic requirements pass; otherwise treat the result as descriptive or abstain.
- Passing proves study integrity, not an AI productivity or quality effect, individual authorship, intent, misconduct or employment suitability.
Minimum evidence
- registered_studies: required and organization-defined
- study_units: required and organization-defined
- as_of_ms: required and organization-defined
How to validate it
Preserve the assignment/adoption design and validate overlap, pre-period or placebo diagnostics, attrition, interference policy, and cluster-level uncertainty; never tune on the estimated effect.
Calibrating it to your org
Same for everyone
The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.
Specific to you
- point-in-time study/unit reconciliation that preserves both arms, nonoverlapping aggregate windows, treatment adherence, control contamination and zero-inclusive mature quality outcomes
- unit and interference definitions, prospective registry freeze, assignment mechanism, AI configuration identity, exposure instrumentation, eligible-change denominator, outcome maturity, trace/adherence/contamination/evidence gates and causal-analysis owner
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
- 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
- 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.
Call it from your AI
You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.
gitrevio_capabilities_search
{ "q": "prove that aggregate aiassisted coding evidence" }
→ finds "audit_ai_code_change_evidence_integrity"
gitrevio_capability_describe
{ "capability_id": "audit_ai_code_change_evidence_integrity" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "audit_ai_code_change_evidence_integrity", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.
Related tools
Forecast AI code maintenance liability
Forecast the long-run maintenance liability of aggregate AI-assisted code inventory with a Bayesian Gamma-Poisson recurrent-event model, learned AI/complexity/age hazards, lognormal severity and correlated repository shock VaR/CVaR.
Optimize AI code assurance portfolio
Choose standard, expert, pair, property, formal or canary assurance per aggregate AI-code change stratum using Beta-binomial defect simulation, unique shared-component loss, hard controls/resources and a CVaR Pareto frontier.
Audit AI capability fallback integrity
Prove that every aggregate capability required when AI is unavailable has a current approved runbook and a sufficiently large, timely, successful, independently observed exercise conducted with AI actually disabled.
Audit AI inference cost allocation integrity
Reconcile provider AI invoices bottom-up to workload and route usage, price terms, cached requests, retries, fixed charges and credits without combining currencies or silently allocating unexplained spend.
Audit AI knowledge grounding integrity
Audit the complete AI knowledge supply chain from immutable source versions through indexed chunks and effective access policy to retrieved evidence, claim-level citations and honestly mature grounding outcomes, without treating unresolved answers as failures.
Audit AI model routing evidence integrity
Audit every live AI-model route against current version-matched local evaluation, uncontaminated temporal holdout, pricing freshness, residency, retention, reliability and genuinely independent provider fallback evidence, counting each workload's value at risk once.