# Workspace file versions

For people and agents editing workspace files, these formats use `version: 1`:

| File | Version syntax | Purpose |
| --- | --- | --- |
| `app.publish.json` | `"version": 1` | App source inputs and data bindings |
| `collection.yaml` | `version: 1` | Collection fields and views |
| `dohc.json` | `"version": 1` | App preview and build settings |
| `.dohc/files.toml` | `version = 1` | File tracking and search rules |

Put the version at the root of each document, before any TOML table headers.
dohc treats a missing version as 1. Generated app and Collection files include the version.
`files.toml` is hand-authored.
A newer version stops that file from applying and names the file with an instruction to update dohc.
An invalid version also stops the file from applying.

`dohc.json` uses `"type": "app"` to declare an app folder. The type is optional.
An explicit different type needs an independent app signal, such as `index.html` or `app.publish.json`, for detection.
A configured build output path alone is not an independent signal.

`app.publish.json` accepts only `version`, `entryPath`, `inputs`, `packageMap`, `collection`, and `dataset`.
It accepts at most one `collection` or `dataset` binding. Retired `backend` declarations remain invalid.
Unknown Collection properties still prevent schema rewrites. An unsupported Collection version prevents record binding and adoption.
Record sync continues. Agent reads name `collection.yaml` and ask for an update; relay refusals ask to update the sync service.
If dohc cannot read `.dohc/files.toml`, or the file uses a newer version, dohc pauses the capture that depends on its rules and retries it.
A malformed `files.toml` leaves the engine's baseline capture rules in effect.
Each of these policy failures stops file search.

In `dohc-settings.json` and `.dohc/local/settings.local.json`, an unknown key leaves the other settings in effect.
`dohc-settings.json` uses `"version": 2`. dohc reads a version 1 file's agent as the `default` entry under `agents` and writes version 2 on its next save.
`agents` keeps each agent by id, so a mistake in one entry turns off only that agent.
One Notices row names the file and ignored keys. Saves preserve those keys and their values.
Use **Try again** after fixing the file. Dismissing the toast keeps its Notices row.
