# ───────────────────────────────────────────────────────────────────────── # GENERATED at deploy by build-ai-resources.py from the minimal source of # truth under content/orgs//ai-resources/. DO NOT EDIT — edit the # source file instead; this copy is rebuilt on every deploy. # ───────────────────────────────────────────────────────────────────────── --- apiVersion: backstage.io/v1alpha1 kind: AiResource metadata: annotations: backstage.io/managed-by-location: url:https://static-ai-stack.dc7.io/catalog/example-org/ai-resources/no-force-push-rule.yaml name: no-force-push-rule title: "No force-push to shared branches" description: "Block git force-pushes from AI agents — history rewrites on shared branches are unrecoverable for everyone else." tags: - ai - rule spec: type: "rule" lifecycle: "production" owner: "group:default/platform-team" system: "ai-tooling" category: "git-safety" rationale: "Force-pushing rewrites shared history: every other clone and open PR based on the old commits becomes silently divergent, and the previous history may be unrecoverable if no other copy exists. Agents operate at high speed and cannot see who else depends on a branch, so the blast radius of a bad force-push is larger than for a human who would check first. Push normally; if a rewrite is genuinely required, a human runs it deliberately after coordinating — `--force-with-lease` included, because the lease only protects against remote drift, not against the coordination problem." disciplines: - platform enforcement: "block"