| name | validation-operations |
| description | Validate 3Lens contracts and run regression tests. Use when checking contract compliance, validating attribution coverage, or running CI validation checks. Use when this capability is needed. |
| metadata | {"author":"adriandarian"} |
Validation Operations
Validation operations ensure code changes comply with 3Lens contracts and don't introduce regressions.
When to Use
- Before submitting a PR
- Running CI checks
- Validating attribution coverage
- Ensuring contract compliance
Commands
Validate Specific Contract
3lens validate inspector
3lens validate capture
3lens validate entity-graph
3lens validate attribution
3lens validate fidelity
3lens validate overhead
Validate All Contracts
3lens validate all
3lens validate all --verbose
Validate Attribution Coverage
3lens validate attribution
Fails if any metrics exist without a clickable path to culprit entities.
Available Contracts
| Contract | Purpose |
|---|
inspector | The 5 Inspector questions |
capture | Event schema, render events |
entity-graph | Stable namespaced IDs, typed nodes/edges |
attribution | Weighted blame chains |
fidelity | EXACT/ESTIMATED/UNAVAILABLE |
overhead | Capture modes, performance budget |
shader-graph | Runtime introspection |
CI Integration
Add validation to your CI workflow:
- name: Validate Contracts
run: pnpm 3lens validate all
Validation Output
{
contract: string,
passed: boolean,
checks: {
name: string,
passed: boolean,
message?: string
}[],
summary: {
total: number,
passed: number,
failed: number
}
}
Agent Use Cases
- Pre-PR check: "Validate all contracts before I submit this PR"
- Specific contract: "Check if my changes comply with the attribution contract"
- CI setup: "Add contract validation to the CI workflow"
- Coverage check: "Ensure all metrics have attribution paths"
Contract Locations
Contracts are defined in .cursor/contracts/:
inspector.md - Inspector contract
capture.md - Capture contract
entity-graph.md - Entity graph contract
attribution.md - Attribution contract
fidelity.md - Fidelity contract
overhead.md - Overhead contract
shader-graph.md - Shader graph contract
Additional Resources
Converted and distributed by TomeVault — claim your Tome and manage your conversions.