---
title: "Lesson 1: Your first landing"
description: "Start a development forge, make a change in a workspace, land it on main, and see what the forge checked and recorded on the way."
---

> 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.

# Lesson 1: Your first landing

**Time:** 20 minutes. **Track:** [developer](https://docs.forge.workreef.dev/learn/#developer).

By the end of this lesson you will be able to:

- start a development forge and connect `af` to it;
- make a change in a workspace and land it on main;
- say what the forge checked before the change landed, and see what it recorded.

## Before you start

You need `af` and `af-server` on your `PATH`, and a terminal open in an empty directory you can delete afterwards. You do not need to know jj or git, though both will feel familiar.

## Start a forge

A development forge runs on your machine alone. It sets itself up: it signs you in as its first administrator, unseals its own vault, and keeps everything in `af-dev` in the directory you start it in. Start one, and leave it running:

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

In a second terminal, load the environment it wrote, and ask for main:

```console check
$ source ~/af-dev/dev/env
$ af main
(main has no commits yet)
```

Main is the one line of history that everything lands on. It has nothing yet.

## Make a workspace

A workspace is a directory of the repository's files that you edit with any tool. `af` notices what you change; there is nothing to add or stage.

```console check
$ af workspace add ~/lesson
Workspace at /home/you/lesson
Paths: **
main has no landing yet
$ cd ~/lesson
```

## Start a change

All work happens in a change. A change has an ID that stays the same however often you rewrite it, as in jj; each version of it is a commit, with an ID of its own. Start one, and write a file:

```console check
$ af new -m "Add a readme"
Working on change nrvvuouszqrmwtktuwwrmlxuwvzvvmkn at commit 1626ab0e0f22c2632fe20b9a70a7918c5123a1f57534e36de6fb843765de7bc6
$ printf 'Atoll Forge lesson one\n' > README
```

Now ask what your change holds and what it is waiting for:

```console check
$ af status
Change nrvvuouszqrmwtktuwwrmlxuwvzvvmkn (open) at commit 5a0384efe9b211c101296ef44256084f6e418d6bdd389b6c59134b7c2ce45223
Landing waits for: scan
$ af diff
A README
--- a/README
+++ b/README
@@ -0,0 +1 @@
+Atoll Forge lesson one
```

`Landing waits for: scan` names the one thing between this change and main on a development forge: the landing scan, the forge's own check for secrets and regulated data. A forge with runners would wait for its tests too.

## Land it

Submitting asks the forge to land the change once everything it waits for is done:

```console check
$ af submit
Submitted commit 5a0384efe9b211c101296ef44256084f6e418d6bdd389b6c59134b7c2ce45223, 0 edits in its last snapshot
```

The scan takes a moment. Then main has your change:

```console eventually
$ af status
Change nrvvuouszqrmwtktuwwrmlxuwvzvvmkn (landed) at commit 5a0384efe9b211c101296ef44256084f6e418d6bdd389b6c59134b7c2ce45223
$ af log
@  nrvvuous dev@localhost 2026-11-25T06:13:00Z 5a0384ef
│  Add a readme
○  zzzzzzzz  1970-01-01T00:00:00Z 00000000
   (no description set)
```

`@` marks the commit your workspace is at. The commit below it, `zzzzzzzz`, is the root that every history starts from.

## What the scan catches

Make a second change that holds something it must not, a payment card number, and submit it:

```console check
$ af new -m "Add a billing fixture"
Working on change wsvtsuypookpxlytsyrlmpupnnlswotq at commit 2fb363dfba18f105e14c9787428ce7e0876d55263396a6cf4c7ea48246cad982
$ printf 'card: 4111111111111111\n' > billing.txt
$ af submit
Submitted commit 3e737bfd07839887cbe74e977320e04e4fe34aa2b6b635fcbe7e2d9a8ad81dee, 1 edit in its last snapshot
```

This time the change waits:

```console eventually
$ af status
Change wsvtsuypookpxlytsyrlmpupnnlswotq (submitted) at commit 3e737bfd07839887cbe74e977320e04e4fe34aa2b6b635fcbe7e2d9a8ad81dee
Based on landing 1
Landing waits for: clearance
The landing scan found 1 thing
```

`af scan` shows what it found: the rule, the file and the line, and a hash of what matched, never the match itself, since the forge keeps its records for good:

```console check
$ af scan
commit 3e737bfd07839887cbe74e977320e04e4fe34aa2b6b635fcbe7e2d9a8ad81dee: 1 finding, by gitleaks v8.30.1 default rules; atoll-forge regulated data
  rules sha256 eb894a9ed5a3e046adfeea5b6a2745e835fcddd9534b73f545c2a974c3f6103e
  billing.txt:1  payment-card-number  sha256 9bbef19476623ca56c17da75fd57734dbf82530686043a6e491c6d71befe8f6e
```

Only a person with the approver role can clear a finding, giving a reason: its author too, unless the forge requires another person, and every compliance report lists a clearance from the change's own line as an exception. Here the secret is real, so the right answer is to take the change back. `af abandon` does that, and your files go back to main:

```console check
$ af abandon
Abandoned change wsvtsuypookpxlytsyrlmpupnnlswotq
$ ls
README
```

## What the forge recorded

Every write to the repository is an operation in its log, as in jj: each change started, each snapshot of your files, each submit and abandon. `af op log` shows them, newest first:

```console check
$ af op log -n 4
5cd50b069197  2026-11-25T06:13:01.097Z  abandon by you
    wsvtsuypookpxlytsyrlmpupnnlswotq
ad99ed3dafe4  2026-11-25T06:13:01.004Z  snapshot by you, undo candidate
    wsvtsuypookpxlytsyrlmpupnnlswotq
efd781529333  2026-11-25T06:13:00.967Z  start by you, undo candidate
    wsvtsuypookpxlytsyrlmpupnnlswotq
bea3f6407837  2026-11-25T06:13:00.891Z  land by the forge
    nrvvuouszqrmwtktuwwrmlxuwvzvvmkn
```

Nothing you did is lost. [Undo a mistake](https://docs.forge.workreef.dev/af/undo/) shows how to take an operation back.

## Exercises

1. Make a change that adds a file `NOTES` with one line, and land it. Then main is your change: `af log -r 'main'` shows main's latest commit alone, and `~` for the history below it that the revset left out:

   ```console check
   $ af new -m "Add notes"
   Working on change znxoqtluvzupkmkwusltrrlttuyxnlkw at commit e46b3639cda6e5332fa44dd05d4631e2a10fa7b27e845992c218908580f6efd5
   $ printf 'remember the root commit\n' > NOTES
   $ af submit
   Submitted commit 4b108a5a2172bc9e4e5c07d3be6aa4368dee5f9be6ed8e628c9abb89ce425e03, 1 edit in its last snapshot
   ```

   ```console eventually
   $ af log -r 'main'
   @  znxoqtlu dev@localhost 2026-11-25T06:13:01Z 4b108a5a
   │  Add notes
   ~
   ```

2. Start a change that adds a line to `README`, and look at `af diff` before you submit. The file is marked `M`, modified, and there was no step to add it: `af` records every edit to the workspace's files in the change.

   ```console check
   $ af new -m "Say more"
   Working on change rnrqoqwnupxyxwssxyztlypvxvltnxwv at commit b85c2f382cfe3bf678b1ed1fc429170e2354575de6ab31d51aa32e452dd21080
   $ printf 'with a second line\n' >> README
   $ af diff
   M README
   --- a/README
   +++ b/README
   @@ -1 +1,2 @@
    Atoll Forge lesson one
   +with a second line
   ```

3. Stop the server with Ctrl-C and start it again from the same directory, then run `af log`. Your landings are still there.

   <details>
   <summary>Where did the forge keep them?</summary>

   In `af-dev`, the data directory it made where you started it. Starting it again from the same directory opens the same forge; delete `af-dev` to start over. Until the forge's first release, a newer build of `af-server` whose tables differ from the one that made `af-dev` refuses it and says so: delete it and start again.

   </details>

## Check your understanding

<details>
<summary>What is the difference between a change ID and a commit ID?</summary>

A change ID names the change, and stays the same however often you rewrite it; a commit ID names one version of it. `af status` shows both: the change, and the commit it is at now.

</details>

<details>
<summary>Why did the second change not land, and who can let it through?</summary>

The landing scan found a payment card number in it. Only a person with the approver role can clear the finding, with `af clear` and a reason; the change's own author may, unless the forge requires another person, and a report lists that clearance as an exception.

</details>

<details>

<summary>

After `af abandon`, where did `billing.txt` go?

</summary>

Abandoning the change took its edits back, and the workspace's files went back to main, which never held `billing.txt`. The operation log still records the abandoned change.

</details>

## Next

[Lesson 2: Changes and stacks](https://docs.forge.workreef.dev/learn/developer/changes-and-stacks/) builds several changes on one another and lands them together.

Source: https://docs.forge.workreef.dev/learn/developer/first-landing/index.mdx
