History and drafts
Every change in Kiki—typed in the editor, triggered by a button, or made by @AI—is recorded with its author and timestamp, and drafts let you build or rework pages on a private branch before applying them.
Browse, compare, and restore
• Workspace history (history.open, workspace menu → History): Filter moments by author, cause, date, or search; click a row to inspect or Shift+click two rows to compare. Switch between Rendered and Source diffs and step through changes with Ctrl+, / Ctrl+. (or Cmd+G).
• Page timeline (history.open-timeline, page menu ⋮ → Timeline): Scrub one page's edits newest-first, view past .ki pages rendered or as source, and restore either just that file or the entire workspace.
• Line authorship (history.toggle-authorship): Show above each line whether a teammate or AI last edited it.
• Named versions (history.name-current-version): Bookmark the current workspace with a label (such as "Before Q4 price update") so it stands out in history.
Restoring an earlier version or reverting a change records a new moment on top—nothing is ever erased.
Query history as data
history.moments and history.changes (per-file line counts) are ordinary typed tables you can filter, group, or chart on any page:
> author = state ((choice ["Everyone" "You" "AI"]) "Everyone")
> input author
> history.moments
|> filter author == "Everyone" or Author == author
|> select When Author Subject Files Added Removed
Compare = (button "Compare" (files.open (history.diff Revision history.now)))
When Author Subject Files Added Removed Compare
Now 0 0 0 Compare
Drafts
A draft is an isolated branch of your workspace for reworking live tools or testing ideas safely:
1. Start a draft from the current workspace (drafts.new) or from any past moment in history.
2. Edit, create, or delete pages freely—teammates on the main workspace are unaffected.
3. Click Review and apply… to inspect page-by-page diffs and merge, or Archive to discard.
Name Active Files Added Removed
Workspace true 0 0 0
Multi-page @AI builds automatically run inside their own draft and hand you this same review (doc/ai.ki).
Where next
• std/history.ki — history.moments, history.changes, and history verbs
• std/drafts.ki — drafts.list and draft verbs
• doc/share.ki — workspace roles and branch permission