agentleFS
ARCASSystemsARCASSystems/FounderOS/skills/restore/SKILL.md

restore

Skill7 starsChanged 19 days agoMITView on GitHub

Undo the founder's OS back to an earlier saved version, non-destructively, wrapping git so they never type a git command. Trigger on "undo", "undo to before this morning", "restore to yesterday", "roll back", "go back to last week", "revert my changes", or any plain request to return to an earlier state. Saves the current work as a safety version FIRST, aborts if that safety save is blocked, then records the undo as a NEW version so the undo itself is reversible. Never rewrites history, never runs a destructive reset, never loses unsaved work.

  • Deletes or force-pushes

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If that safety save is blocked by the privacy guard, the whole undo is ABORTED and nothing is moved.

    line 21
  2. Distinctive:

    Never work around these. Never run git reset --hard, git checkout that discards files, or a force operation to "make undo work." If the …

    line 24
  3. Very specific:

    If core/identity.md does not exist, stop with: Founder OS not set up here.

    line 28
  4. Distinctive:

    Phase 1, safety save (this also previews the undo): Run:

    line 36
  5. Very specific:

    If the output starts with UNDO ABORTED, the safety save was blocked by the guard.

    line 41
  6. Very specific:

    If the script says it could not find a saved version from before that point, nothing was changed.

    line 42
  7. Distinctive:

    Confirm: Ask the founder to confirm they want to undo to that version, given the files that will change.

    line 45
  8. Distinctive:

    Phase 2, apply the undo: Only after a yes, run with the resolved SHA from phase 1:

    line 47
  9. Distinctive:

    If at any point the script reports a hook blocked a commit, relay it and stop.

    line 53
  10. Distinctive:

    Always phase 1 before phase 2.

    line 61
  11. Distinctive:

    Never git reset --hard, never a discarding checkout, never force, never push, never rewrite history.

    line 64
  12. Distinctive:

    No em dashes or en dashes.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

Restore

Runs on: local-exec - runs a local script; on a cloud surface I read the results, I do not run it.

Undo the founder's OS to an earlier saved version, without ever losing work. Wraps git. Local only. Two phases with a confirmation in between, so nothing destructive happens without the founder seeing it first.

The safety promise (read before running)

This verb is fail-safe by construction:

  • It saves the current work as a safety version BEFORE touching anything.
  • If that safety save is blocked by the privacy guard, the whole undo is ABORTED and nothing is moved.
  • The undo is recorded as a NEW version on top of history, so the state you undid FROM stays recoverable. History is never rewritten.

Never work around these. Never run git reset --hard, git checkout that discards files, or a force operation to "make undo work." If the script aborts, relay why and stop.

Pre-flight

  • If core/identity.md does not exist, stop with: Founder OS not set up here. Run /founder-os:setup first.
  • If scripts/caveman_git.py does not exist, stop with: Version control helper not found. Run /founder-os:update to install it.
  • If git is not installed or the folder has no .git/ directory (a ZIP install that has not graduated yet), do not error. Session snapshots still cover this session: run python scripts/session_changes.py --print to show what changed, and restore any single file with python scripts/session_changes.py --restore <path>. For undo across sessions, offer "own my history".

Procedure

  1. Find the target. If the founder named a clear point ("yesterday", "last Friday"), use it. If they are vague, run the history verb (python scripts/caveman_git.py history), show two or three concrete days, and ask which one. Do not guess a target the founder did not confirm. The target goes inside double quotes on the command line, where $, backticks and " still act, so it may hold only letters, digits, spaces, dashes and colons ("yesterday", "last Friday", "2026-10-20"). Anything else, ask for the day instead.
  2. Phase 1, safety save (this also previews the undo). Run:

    python scripts/caveman_git.py restore --to "<target>" --safe-commit
    • The script prints Resolved target: <sha>. Keep that exact SHA. You MUST pass it to phase 2, because the safety save moves the current version and a relative reference like "yesterday" would then point somewhere else.
    • If the output starts with UNDO ABORTED, the safety save was blocked by the guard. Relay the reason in plain words, tell the founder nothing was changed and nothing was lost, and STOP. Do not run phase 2. Do not bypass the guard.
    • If the script says it could not find a saved version from before that point, nothing was changed. Show the founder the history (python scripts/caveman_git.py history) and ask which day. Never retry with a phrase of your own.
    • Otherwise the script prints how it read the phrase (Read '<phrase>' as: ...), which version that is (That version: ...), and the files an undo would change. Show all three to the founder, so they can see the day matches what they meant.
  3. Confirm. Ask the founder to confirm they want to undo to that version, given the files that will change. If they say no, stop. The safety save already made is harmless and stays as a normal version.
  4. Phase 2, apply the undo. Only after a yes, run with the resolved SHA from phase 1:

    python scripts/caveman_git.py restore --to "<resolved-sha>" --apply

    Relay the result plainly: the files are back to the earlier version, recorded as a new version, and the prior state is still recoverable (say "what changed" to see it).

  5. If at any point the script reports a hook blocked a commit, relay it and stop. Never bypass.

Runtime honesty

This verb runs a local script and changes local files. On a surface that cannot run a script or write files (a web-only agent), say so plainly: you can explain what an undo would do and help the founder pick a target, but you cannot perform the undo there. They run it in Claude Code or another local-runtime agent pointed at the folder.

Rules

  • Always phase 1 before phase 2. Never skip the safety save.
  • Abort the whole undo if the safety save is blocked. Never move the tree after a blocked safety save.
  • Pass the resolved absolute SHA to phase 2, never a relative reference.
  • Never git reset --hard, never a discarding checkout, never force, never push, never rewrite history.
  • No em dashes or en dashes. Hyphens only.

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.