chat-checkpoints

Implements chat checkpointing with git snapshots, session restore, and edit-resend rollback in AppLoop.

6|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/josoroma/AppLoop --skill chat-checkpoints-josoroma
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: chat-checkpoints
Source: https://github.com/josoroma/AppLoop/tree/main/.hermes/skills/chat-checkpoints
Command: npx skills add https://github.com/josoroma/AppLoop --skill chat-checkpoints-josoroma

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? It gives the AppLoop builder durable undo and branching for AI-driven edits: every prompt auto-saves conversation state plus a git commit of the generated project, so restoring a session or editing an old prompt reverts both messages and files consistently. ## Core Features & Use Cases - Auto-checkpoints on prompt submit: Each send creates a git file snapshot (git add -A && git commit) and a hidden prompt checkpoint before chat.sendMessage runs. - Session boundaries and restore: New sessions capture full message snapshots, persist to the chat_checkpoints SQLite table, and restore via git reset --hard plus chat.setMessages. - Edit & resend: Restore/Edit buttons on past user messages truncate UI and DB messages from the clicked prompt onward, revert files, restart the runtime, and optionally prefill the raw prompt. - Use Case: A user dislikes the last three AI-generated changes to their Next.js app; clicking Restore on an earlier prompt rolls back the workspace files via git and deletes the later persisted messages so they never reappear on reload. ## Quick Start Ask the assistant to modify or debug the checkpoint restore flow in builder-shell.tsx using the chat-checkpoints conventions for snapshots and DB persistence.

Frequently Asked Questions about chat-checkpoints

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do chat checkpoints work in the AppLoop builder?▼

Every prompt submit triggers a git commit snapshot of the project workspace and saves a hidden checkpoint with the message IDs before the prompt. Session boundaries store full message snapshots and appear in the history dropdown for restore.

How do I restore a previous chat session with file rollback?▼

Select a session from the history dropdown. The system runs git reset --hard to the checkpoint's commit hash, reconstructs messages from stored MessageSnapshot entries via chat.setMessages, and restores inspect targets and screenshots.

Why do restored messages reappear after a page reload?▼

UI-only truncation is not enough because listConversationMessages rehydrates persisted rows on mount. Restore must also delete DB message rows from the clicked prompt onward, scoped by the active conversation id.

Why is git clean -fd not used when reverting file snapshots?▼

If a workspace lacks its own .git, git commands resolve to AppLoop's parent repo where .apploop is gitignored, so git clean -fd would delete every workspace source file. revertToFileSnapshot uses git reset --hard with three guards instead.

Should I restart the runtime after every Hermes response to refresh the preview?▼

No. Use the previewReloadKey appended as ?_t=N to the iframe src, which forces a fresh load without port changes. restartRuntimeAction allocates new ports and leaves projects.preview_port stale; reserve it for post-revert only.

Why does checkpoint restore fail with 'Project access denied'?▼

The useChat id must be exactly the projectId because /api/chat uses it for requireProjectAccess. Appending a sessionKey produces an id like projectId-0 that fails access checks; session isolation uses chat.setMessages instead.