# SPDX-License-Identifier: MPL-2.0
# Dustfile — recovery, rollback, and deprecation semantics (template)
# Fill in: replace placeholder paths and commands with real repo paths.
# See: standards/contractiles/CANONICAL-TEMPLATES.adoc

version: 1

recovery:
  source:
    - name: source-rollback
      description: "Revert all source changes to the last commit."
      rollback: "git checkout HEAD -- ."
      notes: "Use when a bad patch lands and local tests break before merge."

  generated:
    - name: regen-outputs
      description: "Re-derive all generated artefacts (headers, bindings, machine-readable outputs) from source of truth."
      handler: "just gen"
      notes: "Covers auto-generated C headers, A2ML outputs, and any derived files."

  config:
    - name: config-rollback
      path: "REPLACE-WITH-REAL-CONFIG-PATH"
      rollback: "git checkout HEAD~1 -- REPLACE-WITH-REAL-CONFIG-PATH"
      notes: "Roll back a specific config or policy file without disturbing the rest of the tree."

preserve:
  # Data-preservation carve-out: artefacts a cleanup/uninstall/de-dup pass MUST NOT remove.
  - name: glama-readme
    path: "README.md"
    condition: "test -f glama.json"
    notes: "Glama (glama.ai, the MCP-server directory) requires README.md to index this server and will not render README.adoc. When glama.json is present, do NOT delete README.md as a duplicate-format violation. README.adoc remains the canonical source of truth; regenerate README.md from it rather than dropping it."

deprecation:
  - name: example-deprecated-surface
    what: "REPLACE with the real API, module, or command being retired."
    since: "vX.Y.Z"
    remove-by: "vX+1.0.0"
    migration: "See ROADMAP.adoc or CHANGELOG for the replacement."
    notes: "Remove this entry once the deprecated surface is gone and the remove-by version ships."
