Sync Generated Artifacts
CHANGE-SYNC-GENERATED-ARTIFACTS
Summary
Update checked-in generated outputs when their source inputs change and they are part of review. Keeping them aligned prevents consumers from seeing stale artifacts.
Rule
Keep generated artifacts in sync when they are part of the review surface.
Why
Generated files, lockfiles, snapshots, API listings, and agent packs are part of the review surface when they are checked into the repo. Leaving them stale makes the source change look complete while the generated consumer-facing artifact disagrees.
Helps
- Prevents drift between source inputs and generated outputs.
Limits
Do not regenerate broad artifacts unrelated to the change. Run the narrow generator or explain why the artifact is intentionally unchanged.
Agent Instruction
Update them with the source change because checked-in generated files, lockfiles, snapshots, API
listings, or agent packs are review surfaces.Mechanisms
Supported by generator scripts, --check modes, snapshot tests, lockfile checks, API diff tools,
and PR validation that reports regenerated files.