# desk.yml

The project's shared settings, in one file in its folder, so everyone on the project gets the same commands, skills, docs and pages folder.

Put a `desk.yml` in your project folder and commit it, and everyone who opens the project in
Rundesk gets the same commands, skills, docs and pages folders, book title and author, and project icon. It's a YAML file, and each key below is
optional. A project without one has no shared commands or skills list, and Rundesk reads its docs
from `docs/`. To write one for a real stack, step by step, follow
[Run a dev stack](/docs/run-a-dev-stack.md).

Rundesk reads the file again every 2 seconds while the project is open, so an edit you or an agent
make in an editor shows without a reload. Keys Rundesk does not use are ignored, never refused.

## processes: the commands in the Commands section

Each entry under `processes` is a command listed in the project's **Commands** section, in file order,
named after its key. See [Terminals and commands](/docs/terminals.md) for starting and stopping them.

```yaml
processes:
  api:
    command: php artisan serve
    working_dir: api
    env:
      APP_ENV: local
      PORT: 8080
```

| Key | Default | Description |
|---|---|---|
| `command` | required | The command line, run through your login shell. |
| `working_dir` | the project folder | The folder it runs in, relative to the project folder. |
| `env` | none | Environment variables for the command, set on top of your login environment. Numbers and `true` become text. |
| `auto_start` | `false` | Read and ignored: nothing starts until you start it. |

## skills: the skills everyone on the project gets

A list of skill names. Each person working in the project gets every listed skill their own library
has. A name their library lacks is skipped, and shows dimmed with a red mark at the end of the
project's skills in the sidebar, so they can see what they're missing. Use `<package>:<name>` to
name one package's skill exactly. When a name leaves the list, the copy Rundesk wrote into the
project goes too. See [Skills](/docs/skills.md).

```yaml
skills:
  - writing-docs
  - team:tickets
```

## skills_git: track skill copies in git or ignore them

Whether git tracks the skill copies Rundesk writes into the project: `ignore` (the default) or
`track`. Choosing **Track in git** in the Skills section writes `skills_git: track`; **Ignore in
git** takes the line out.

```yaml
skills_git: track
```

## docs: where the project's docs live and how they're checked

`docs` names the folder of the project's docs, shown in the **Docs** tab of
[Files & Docs](/docs/docs-view.md), and sets how Rundesk's docs check treats them. Write `docs` as a folder name, or as a map when the project needs more than the folder.

Without `docs`, Rundesk uses `docs/` and checks every page there with its defaults. As a folder name,
the value is the folder, relative to the project folder:

```yaml
docs: documentation
```

Write a path with forward slashes on every platform, such as `docs/guide`. A path that is absolute,
climbs out of the project with `..`, or holds a backslash or a colon is skipped, and Rundesk uses
`docs/` instead.

### Set the docs check with a docs map

As a map, `docs` names the folder and sets the docs check for everyone on the project. Every key is
optional; leave one out and its default applies.

| Key | Type | Default | Description |
|---|---|---|---|
| `path` | text | `docs` | The docs folder, relative to the project folder, as the folder name above. |
| `unchecked` | list of folders | none | Folders inside the docs folder that the docs check skips entirely, written relative to the docs folder, such as `plans`. |
| `check.length` | whole number above 0 | `500` | The words of prose a page holds before the `length` hint shows. |
| `check.hints` | `false`, or a list of hint kinds | every hint | `false` turns off every hint; a list turns off only the kinds it names. Warnings stay either way. |
| `check.citations` | `true` or `false` | `true` | `false` turns off the citation findings, `uncited` and `citation`, and with them the red `[citation needed]` marks. |
| `check.code` | list of globs | none | Markdown files outside the docs folder that a footnote may cite as code, such as `["skills/**/*.md"]`, for a project whose product is markdown. A citation of one still needs the heading it links to, and a docs page never counts. |

A page in an `unchecked` folder gets no findings at all: no warnings, no hints, no `[citation needed]`
marks, and no count beside it in the nav. It still shows in the **Docs** tab and opens as usual, and a
link to it from a checked page is still checked. That makes an `unchecked` folder the place for
plans, proposals and meeting notes that sit beside the docs without being held to them.

A citation of a markdown file is a warning, because a document can be wrong too, so cite the code.
In a project whose product is markdown, such as a skills catalog, the markdown is the code: list it
under `check.code` and a footnote may cite it, down to the heading that makes the sentence true.

```yaml
docs:
  path: docs
  check:
    code: ["skills/**/*.md", "subagents/*.md"]
```

`**` stands for any number of folders, `*` for any run of characters in a name, and `?` for one
character. Every other citation rule still applies: a citation of a heading the file does not have is
a warning, a sentence with no citation still gets `[citation needed]`, and a page of the docs folder
never counts as code.

The hint kinds `check.hints` can list are `heading`, `pointing`, `vague-actor`, `empty-word`,
`plain-english`, `stale`, `length`, `intro`, `title`, `duplicate-heading`, `duplicate-title`,
`order-prefix`, `home`, `depth`, `html` and `disposable`, each as the check names it in a finding,
such as `hint stale:`.

This project puts its plans in `docs/plans`, writes longer reference pages, and turns off the hint
about pages whose code changed:

```yaml
docs:
  path: docs
  unchecked:
    - plans
  check:
    length: 900
    hints: [stale]
```

A value of the wrong kind is ignored and its default used, as for any key Rundesk does not read:
a `length` that is not a whole number, a `hints` that is neither `false` nor a list of names, or an
`unchecked` folder that is absolute or climbs out with `..`. Nothing warns about it, and the
project's commands and skills load as usual. To see what took effect, run the docs check from an
agent: its report ends with a line such as
`Settings from desk.yml: length 900; hints off: stale; unchecked: plans`, and a setting missing from
that line was not read.

## pages: the folder of your own writing

`pages` names the folder that holds your writing, a story, a book or an essay, as sheets: the
`sheet-<seconds>.md` files in it, shown in the **Pages** tab of [Files & Pages](/docs/pages.md).
[Write a book in Rundesk](/docs/write-a-book.md) sets one up step by step.

```yaml
pages: book/draft
```

or, as a map:

```yaml
pages:
  path: book/draft
```

Without `pages`, Rundesk uses a `pages/` folder, but only while it holds a sheet anywhere in it, or
no files at all (hidden ones such as `.DS_Store` don't count). That way a website's or a wiki's own
`pages/` of markdown, templates and images never turns into a Pages tab; if yours does hold your
writing, name it here. A folder you name here is the pages folder whatever it holds.

The value is a folder relative to the project folder, written as above, or as a map with `path:`, with
the same rules as `docs`: a path that is absolute, climbs out with `..`, or holds a backslash or a
colon is skipped, and Rundesk uses `pages/` instead. A folder that `docs` names too, or one that
holds the docs folder, belongs to the docs, and the project shows no Pages tab.

## Turn the docs or Pages off for a project

Set `docs` or `pages` to `false` to turn that feature off for the project:

```yaml
docs: false
pages: false
```

In a project that uses `solo.yml`, put the line there; the messages name that file.

With `pages: false`, the project has no Pages tab, and its `pages/` is an ordinary folder: the Files
tab adds, renames, moves, deletes and saves there, its markdown files open as plain files, and a sheet
already open becomes an ordinary file tab, with its unsaved text carried over. With `docs: false`,
there is no Docs tab, **Search docs** finds nothing, and `docs/` is an ordinary folder whose pages open
as plain files. With both, the Files button opens the Files tree alone. An agent's Pages tools, and
its docs check, say the feature is off for the project.

Only a bare `false` turns a feature off; `true`, or any other value that isn't a usable path, is
skipped, and Rundesk uses the default folder. Rundesk picks the change up within two seconds.

## Set your book's title and author

Writing a book in the project's Pages? Give it its title and author once, here, and everyone working
on the project has them with the manuscript: Read manuscript and your PDF show them at the top of most pages, the title on the left and the author on the right. The first page of a chapter's opening or of a sheet at the top of Pages shows none, and neither does a sheet with pages of its own or one centered on the page, unless the sheet's [`header`](/docs/page-settings.md#every-page-setting-and-its-default) says so. Spaces around them are dropped, and a title that is a
number, such as `1984`, reads as written.

```yaml
title: The Salt Road
author: Ada Lane
```

## icon and color: the project's avatar

`icon` sets the project's avatar for everyone who works in it. Give it the name of one of Rundesk's
icons and `color` to draw it in: a hex color, or one of `indigo`, `sky`, `emerald`, `amber`, `red`, `pink`, `violet`, `slate`, `blue`, `teal`, `lime`, `orange`, `crimson` (a deeper red
than `red`), `fuchsia`, `purple` and `brown`. Hover an icon in **Choose icon** to see its name; write it as shown, or
in lowercase with hyphens (`book-open`).

```yaml
icon: rocket
color: emerald
```

Or give it the path of an image inside the project, a PNG, JPEG, GIF, WebP, ICO or SVG of at most 1 MB.
`color` is ignored for an image:

```yaml
icon: public/logo.svg
```

Rundesk never reads an image through a link or outside the project. A name it doesn't know, a path
that leads nowhere usable, or a file it can't draw shows the project's letters instead.

When more than one avatar could show, this is what wins:

1. Your own choice in the project's **Edit** dialog wins over the file. **Use the project's icon**
   there goes back to the file's.
2. The file's `icon` wins over a favicon Rundesk found when you added the project.
3. An icon's name wins over a file of the same name, so `icon: rocket` is the icon even if the
   folder holds a file called `rocket`.

Without a usable `icon`, Rundesk looks for a common icon file such as `favicon.svg` or `logo.png`
when you add the project. A change to the icon shows almost at once. See [Workspaces and projects](/docs/projects.md).

## desk.yml error messages

A typo in the file doesn't fail quietly: the project shows the message in place of its commands,
starting with the file's name (`solo.yml` when that's the file Rundesk reads). These are the ones
you can meet.

| Problem | Message |
|---|---|
| The file is not valid YAML | `desk.yml:` and the YAML parser's error |
| An entry under `processes` has no `command` | `desk.yml:` and the parser's error, naming `command` |
| An `env` value is a list or a map | `desk.yml: <name>: env <key> is not a scalar` |
| `skills_git` is neither `track` nor `ignore` | `desk.yml: skills_git is track or ignore` |
| `skills` is not a list | `desk.yml: skills is not a list` |
| `skills` holds something other than names | `desk.yml: skills lists something that is not a name` |

Fix the line it names and save. Rundesk reads the file again every 2 seconds, so your commands come
back without a reload.

## When Rundesk edits desk.yml

Rundesk writes the file only when you ask it to:

- You add a command with **Add to project file**, or **Edit** or **Delete** a project command.
- You choose **Track in git** or **Ignore in git** for the project's skills.
- You remove from the project a skill the file lists, after a confirmation that says so.

Each change touches only its own lines, and every other line, comment and key is left as it was. A
change that cannot be made that way is refused with a message, and the file stays unchanged. With no
command file, adding a command or choosing **Track in git** creates a new `desk.yml`.

## A full desk.yml example

```yaml
title: The Salt Road
author: Ada Lane
icon: public/logo.svg
docs:
  path: documentation
  unchecked: [plans]
skills_git: ignore
skills:
  - writing-docs
processes:
  web:
    command: pnpm dev
  api:
    command: php artisan serve
    working_dir: api
    env:
      APP_ENV: local
      PORT: 8080
```

## Related pages

- [Run a dev stack](/docs/run-a-dev-stack.md): write a `desk.yml` for a web and an api command, and start them.
- [Terminals and commands](/docs/terminals.md): start, stop and add commands from the **Commands** section.
- [Skills](/docs/skills.md): what the `skills:` list gives each person on the project.
