# Define and publish types

AI agent getting started? Read [Agents: start here](https://docs.openeng.io/agents/start-here.md) first.

Draft, validate and publish your team’s shared record definitions.

Source: https://docs.openeng.io/configure/types/

Types define the properties and presentation of your engineering records. Publish them for the organisation, then create objects that follow those definitions. A type change is separate from a data-branch change.

## Put it in a complete type definition

[Download requirement-type.json](https://docs.openeng.io/examples/requirement-type.json). This complete example defines four required properties, an object detail view and a collection table. It uses the distinct key `guide-requirement` so it does not replace the turbine example’s Requirement type.

Use an organisation where that key is not already published. The file maps type keys to definitions and is ready for the CLI’s `--from` argument. You can add relationships and a structure tree later.

## Inspect the shared draft

Sign in and attach the CLI to the intended organisation, then check for an open change set:

```sh
openeng types draft current
```

The organisation shares one open change set. If one exists, inspect it with `openeng types draft state --change-set <id>` and coordinate with its authors. Use a draft with no other proposed changes for this exercise; do not replace someone else’s work with the example file.

When you are ready, open the draft and keep the returned identifier and revision:

```sh
openeng types draft open
```

## Revise, validate and review

Use the draft’s current revision when revising it, then the new revision returned by that call when validating:

```sh
openeng types draft revise --change-set <id> --revision <revision> --from requirement-type.json
openeng types draft validate --change-set <id> --revision <new-revision>
openeng types draft show --change-set <id> --project <project-id>
```

Validation should report no violations. Inspect the complete diff before publishing; accepting a change set publishes all its proposed changes.

```sh
openeng types draft accept --change-set <id> --revision <reviewed-revision>
```

## Try the published type

1. Open **More types** in the project’s navigation sidebar and select **Guide Requirement**. The example sets no sidebar group, so it appears there.
2. On a working branch, create an object with the four required fields.
3. Open it to see the configured detail panel.
4. Select **App** in the type workspace to see the configured collection table. The built-in **Table** and **Graph** tabs remain available separately.

Older objects keep their saved type version; publication does not rewrite them. Next, [configure views](https://docs.openeng.io/concepts/views.md) or [draft types with an agent](https://docs.openeng.io/agents/design-your-tool.md).
