---
title: "The change model"
description: "How Atoll Forge models work, on jj's model - changes that keep their IDs across rewrites, an operation log of every write, rebases that follow main, conflicts held as data, and stacks that land as one on a linear main."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.forge.workreef.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The change model

[Changes and landings](https://docs.forge.workreef.dev/concepts/changes/) shows how work moves. This chapter explains the model under it: what a change is, what the forge records of every write, and how a change follows main. It is [Jujutsu](https://jj-vcs.github.io/jj/)'s model, with jj's own code doing the work, held in the forge for every person and agent at once instead of in one checkout.

## A change and its commits

A **change** is a piece of work; a **commit** is one version of it. The change keeps its ID, in the letters k to z, however often it is rewritten; each rewrite is a new commit, with a new ID in hex. jj calls the record of a change's commits its evolution log. Start a forge and a change, and describe it twice:

```console server
$ af-server --dev
...
```

```console check
$ source ~/af-dev/dev/env
$ af workspace add ~/one
Workspace at /home/you/one
Paths: **
main has no landing yet
$ cd ~/one
$ af new -m "Greet"
Working on change qsoysyurukruzrqywnkyouvyyxssovro at commit 665ae57fa2eef80225ed3048a561667fb61df6b9448ed3c37748afe769918151
$ printf 'hello\n' > greet.txt
$ af describe -m "Greet the reader"
Change qsoysyurukruzrqywnkyouvyyxssovro is now at commit 4f4ceb64b5257f1db75f609fff6c3a0db094ae1d5b890cd18590e611f65b9235
$ af evolog
4f4ceb64b5257f1db75f609fff6c3a0db094ae1d5b890cd18590e611f65b9235 qsoysyurukruzrqywnkyouvyyxssovro dev@localhost 2026-11-25T14:29:54Z
    Greet the reader
    -- operation f2947e7e4725 from 1f57b42d5090e241b5621d16c8a28bee1b97d20aa194b79f736372edd135f2c5
1f57b42d5090e241b5621d16c8a28bee1b97d20aa194b79f736372edd135f2c5 qsoysyurukruzrqywnkyouvyyxssovro dev@localhost 2026-11-25T14:29:54Z
    Greet
    -- operation 716da48ea4e6 from 665ae57fa2eef80225ed3048a561667fb61df6b9448ed3c37748afe769918151
665ae57fa2eef80225ed3048a561667fb61df6b9448ed3c37748afe769918151 qsoysyurukruzrqywnkyouvyyxssovro dev@localhost 2026-11-25T14:29:54Z
    Greet
    -- operation d4e4209e48e1
```

Each entry of `af evolog` is a commit of the one change, newest first, with the operation that made it and the commit it came from: the description, then the snapshot of `greet.txt`, then the start. The change ID is the same in all three. Anyone who names the change by its ID finds its newest commit, so a reviewer, a test or an agent that holds the ID never holds a stale version.

There is no index and no staging: the files in your workspace are the change. The forge takes a snapshot of them before every command that reads or rewrites the change, as jj does, so an edit is never left behind.

## Every write is an operation

Each write to the repository, a start, a snapshot, a description, a rebase, a landing, is an **operation** in the repository's log, by whoever made it. The log is the repository's own record, the same for every person and agent:

```console check
$ af op log -n 3
f2947e7e4725  2026-11-25T14:29:54.653Z  describe by you, undo candidate
    qsoysyurukruzrqywnkyouvyyxssovro
716da48ea4e6  2026-11-25T14:29:54.65Z  snapshot by you, undo candidate
    qsoysyurukruzrqywnkyouvyyxssovro
d4e4209e48e1  2026-11-25T14:29:54.617Z  start by you, undo candidate
    qsoysyurukruzrqywnkyouvyyxssovro
```

An operation is never edited: `af undo` publishes a new operation that takes an earlier one back, and `af op diff` compares what the changes were at any two operations. Old operations leave the log only when the forge's collector cuts it, past the repository's operation window. Within it, nothing that happened to a change is out of sight: the forge's answer to "what did this agent do" is a read of the log.

## Following main

A change is built on a landing of main. When main moves, your change follows it by a **rebase**, as `jj rebase` would: its edits replayed onto the newer landing, under the same change ID. Land a change to the same file from a second workspace:

```console check
$ af workspace add ~/two
Workspace at /home/you/two
Paths: **
main has no landing yet
$ cd ~/two
$ af new -m "Greet in French"
Working on change kwrlmtzzyyzkxsqyvrskylrxvzkxssko at commit 46826466b48c18beeb4b86f06a11b2080be3f9fe3cf1f7432dfc3f4db7365ca8
$ printf 'bonjour\n' > greet.txt
$ af submit
Submitted commit 898136c260204c0e1e61c5b0e27acb81a02d81d309376f8949e2d4b8a352e3e5, 1 edit in its last snapshot
```

```console eventually
$ af status
Change kwrlmtzzyyzkxsqyvrskylrxvzkxssko (landed) at commit 898136c260204c0e1e61c5b0e27acb81a02d81d309376f8949e2d4b8a352e3e5
```

The first change edited the same line. `af sync` rebases it onto the landing:

```console check
$ cd ~/one
$ af sync
At landing 1: 1 file written, 0 deleted
$ af status
Change qsoysyurukruzrqywnkyouvyyxssovro (open) at commit 735323058c7f4dce8405ea2a2fa532953363eb9d62c5323cc9259532bec7f581
Based on landing 1
Conflicts in:
  greet.txt
Landing waits for: scan
```

The rebase met a **conflict**, and still succeeded: the change is on landing 1, with a new commit. A conflict is data in the commit, not a state the repository is stuck in: the change's commit holds both sides, the file on disk shows them with jj's markers (main's side, then your change as a diff), and every other command goes on working. Resolving is writing the file you want; the next snapshot records it, and the conflict is gone:

```console check
$ cat greet.txt
<<<<<<< conflict 1 of 1
+++++++ kwrlmtzz 898136c2 "Greet in French" (rebase destination)
bonjour
%%%%%%% diff from: zzzzzzzz 00000000 (parents of rebased revision)
\\\\\\\        to: qsoysyur 4f4ceb64 "Greet the reader" (rebased revision)
+hello
>>>>>>> conflict 1 of 1 ends
$ printf 'hello, bonjour\n' > greet.txt
$ af status
Change qsoysyurukruzrqywnkyouvyyxssovro (open) at commit 91d33ec94529c56af5bcd5d0dabdd7a406c3b76d75c65c7f9851c95a5ae00b51
Based on landing 1
Landing waits for: scan
```

## Stacks land as one

A change built on another open change makes a **stack**: `af new` on an open change starts the next one on top. Submitting the top change submits the changes of yours below it, and the stack lands as one, in order or not at all, so main never holds a change without the one below it. `af absorb` moves each edit into the change below that last changed those lines, and `af rebase`, `af split` and `af squash` reshape a stack; each keeps every change's ID, and each is an operation in the log.

## A linear main

main is one line: each landing is one commit on top of the one before, and main never holds a merge commit. A change can still build on several others, `af new A B` as `jj new A B` makes it, their files all in its workspace. It waits until each has landed the very commit it builds on, and then lands as one commit on main with only its own edits, as jj rebases a merge whose parents are already its base. If one of them went on past that commit, or was abandoned, the change goes back to its author, since what it would land was never checked. The history main shows is the order things landed in, and `af log -r main` reads it straight down.

## What the model leaves out

- **Branches and bookmarks.** Work is named by its change ID; there is one main.
- **An index, staging, stashes.** The workspace's files are the change.
- **Interactive editors.** Nobody edits a hunk by hand: an agent names paths, and `af absorb` finds where lines belong.
- **Git, except at the edges.** Git history comes in once, by [import](https://docs.forge.workreef.dev/start/from-git/); a one-way mirror of main out to git is planned.

## Next

- [Workspaces](https://docs.forge.workreef.dev/concepts/workspaces/): where a change's files are, and how a workspace follows main.
- [Take back work](https://docs.forge.workreef.dev/af/take-back/) and [Undo a mistake](https://docs.forge.workreef.dev/af/undo/): the operation log at work.
- [Shape a stack](https://docs.forge.workreef.dev/af/stacks/): rewriting a stack, change by change.

Source: https://docs.forge.workreef.dev/concepts/change-model/index.mdx
