agentleFS
davekilleendavekilleen/Dex/.agents/skills/dex-rollback/SKILL.md

dex-rollback

Skill509 starsChanged 3 months agoMITView on GitHub

Rewind one receipt-backed Dex adoption through the frozen lifecycle service. Use when the user says 'undo the update', 'go back', 'that broke something after updating'. Not for applying an update; use `dex-update`.

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 18 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when someone wants to undo a Dex adoption.

    line 10
  2. Very specific:

    Every rewind goes through core.lifecycle.service version 1.0.0.

    line 14
  3. Distinctive:

    Use the service in this order:

    line 16
  4. Very specific:

    Ask read_lifecycle_state for the verified ledger and retention state.

    line 18
  5. Distinctive:

    Ask for explicit confirmation of that exact adoption and file list.

    line 22
  6. Very specific:

    Ask read_lifecycle_state again and render the rewind receipt and resulting state.

    line 24
  7. Distinctive:

    when the lifecycle ledger recorded it, if the state provides that time.

    line 33
  8. Distinctive:

    Do not call a receipt rewindable unless the verified state says its receipt and retained snapshot pass preflight.

    line 47
  9. Distinctive:

    Before requesting the rewind, show every affected path and say what the service will do:

    line 51
  10. Distinctive:

    remove only files that this receipt proves the adoption created.

    line 54
  11. Distinctive:

    leave later user changes untouched by refusing if receipt-owned files drifted.

    line 55
  12. Distinctive:

    Ask one direct question: “Rewind this exact adoption?” Confirmation of an item name alone is insufficient if the receipt or file list has …

    line 59
  13. Very specific:

    After rewind_adoption_by_receipt succeeds, render:

    line 63
  14. Distinctive:

    every restored or removed receipt path.

    line 67
  15. Distinctive:

    Use language such as:

    line 72
  16. Distinctive:

    Never claim success unless the service returned a rewind receipt and the refreshed lifecycle state verifies the item is no longer adopted.

    line 76
  17. Distinctive:

    Never perform or recommend raw vault file operations.

    line 80
  18. Distinctive:

    Never use source-control history as a substitute for a lifecycle receipt.

    line 81
  19. Distinctive:

    Never alter a receipt, acknowledgement token, transaction identifier, or path list.

    line 82
  20. Distinctive:

    Never rewind more than the chosen receipt proves.

    line 83
  21. Distinctive:

    Never overwrite a file that changed after adoption.

    line 84
  22. Distinctive:

    If no receipt is rewindable, say so plainly and stop.

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- Generated from `.claude/skills/dex-rollback/SKILL.md` by `scripts/generate-agents-skills.py`. Do not edit. -->

Dex Rollback

Use this skill when someone wants to undo a Dex adoption. Keep the language calm and concrete. This skill selects and renders a receipt; it never restores, copies, deletes, renames, or rewrites vault files itself.

The one route

Every rewind goes through core.lifecycle.service version 1.0.0. The only mutation operation this skill may request is rewind_adoption_by_receipt. There is no manual fallback and no file-by-file workaround.

Use the service in this order:

  1. Ask read_lifecycle_state for the verified ledger and retention state.
  2. Render the adopted items that have receipt-backed rewind evidence.
  3. Let the user choose exactly one adoption receipt.
  4. Show the receipt’s transaction identifier and complete file list.
  5. Ask for explicit confirmation of that exact adoption and file list.
  6. Pass the unchanged adoption receipt and its exact acknowledgement token to rewind_adoption_by_receipt.
  7. Ask read_lifecycle_state again and render the rewind receipt and resulting state.

If the snapshot has aged out, a file changed after adoption, the ledger cannot be verified, the acknowledgement does not match, or the service refuses for any other reason, stop. Explain that no files were changed. Never guess an older state from release files or version labels.

Choice view

For each rewindable adoption, show:

  • item names and versions;
  • when the lifecycle ledger recorded it, if the state provides that time;
  • adoption transaction identifier;
  • number of receipt-declared files;
  • whether the retained snapshot is still available;
  • whether any adopted file has drifted since adoption.

Example register:

I found one update that can still be undone exactly. It changed three Dex-owned files, and none of those files has changed since.

A version update appears as dex-release at the installed version. Treat it the same as any other receipt-backed item: it is rewindable only when the verified state says its receipt and retained snapshot pass preflight.

Do not call a receipt rewindable unless the verified state says its receipt and retained snapshot pass preflight.

Confirmation

Before requesting the rewind, show every affected path and say what the service will do:

  • restore the exact pre-adoption bytes for files that existed;
  • remove only files that this receipt proves the adoption created;
  • leave later user changes untouched by refusing if receipt-owned files drifted;
  • perform the rewind as a new crash-safe transaction;
  • record a new rewind receipt rather than erasing history.

Ask one direct question: “Rewind this exact adoption?” Confirmation of an item name alone is insufficient if the receipt or file list has changed.

Result view

After rewind_adoption_by_receipt succeeds, render:

  • original adoption transaction identifier;
  • new rewind transaction identifier;
  • every restored or removed receipt path;
  • snapshot reference for the rewind transaction;
  • verified post-rewind lifecycle state;
  • current retention warning, if any.

Use language such as:

Rollback complete. Dex restored the exact receipt-backed pre-update state in one protected transaction and kept the history visible.

Never claim success unless the service returned a rewind receipt and the refreshed lifecycle state verifies the item is no longer adopted.

Boundaries

  • Never perform or recommend raw vault file operations.
  • Never use source-control history as a substitute for a lifecycle receipt.
  • Never alter a receipt, acknowledgement token, transaction identifier, or path list.
  • Never rewind more than the chosen receipt proves.
  • Never overwrite a file that changed after adoption; render the refusal and route the decision back to the user.
  • If no receipt is rewindable, say so plainly and stop.

The user chooses the receipt. The skill explains the consequence. The lifecycle service owns the mutation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.