# Authoring

Authoring is where you **describe meaning**. You declare what your software _is_ (typed structures, what can happen, who may do it, what it emits) and nothing about how any framework represents it. Packs turn that meaning into code.

```mermaid
flowchart LR
    A["TypeScript<br/>@dryvcode/author"] --> C["Compiler<br/>dryv-ts"]
    B["Python<br/>dryv-author"] --> D["Compiler<br/>dryv-py"]
    C --> IR["Canonical<br/>Runtime IR"]
    D --> IR
    IR --> P["Packs<br/>NestJS · FastAPI · Next.js · Flutter ..."]
    P --> F["Generated code"]
```

Both languages describe the **same concepts** and compile to the **same IR**, so you can pick the language your team already writes and still use every pack.

## What you describe

| Concept             | In one line                                                      | Reference                                      |
| ------------------- | ---------------------------------------------------------------- | ---------------------------------------------- |
| **Property**        | A reusable value type: `string.uuid`, an enum, a union, a date   | [Properties](/authoring/vocabulary/properties) |
| **Schema**          | Typed structure built from fields: entities, requests, responses | [Schemas](/authoring/vocabulary/schemas)       |
| **Operation**       | What happens: one input, one output, failures, events            | [Operations](/authoring/vocabulary/operations) |
| **Event**           | A business occurrence with an optional payload                   | [Events](/authoring/vocabulary/events)         |
| **Failure**         | A named, typed way an operation can fail                         | [Operations](/authoring/vocabulary/operations) |
| **Policy**          | A reusable rule or required context, not a framework guard       | [Policies](/authoring/vocabulary/policies)     |
| **Workflow**        | Orchestration over operations and events                         | [Workflows](/authoring/vocabulary/workflows)   |
| **View**            | A user-facing composition of parts on a surface                  | [Views](/authoring/vocabulary/views)           |
| **Group / feature** | Ownership and registration scopes                                | [Groups](/authoring/vocabulary/groups)         |

Start with the [Quick start](/authoring/quick-start), then keep the [Cookbook](/authoring/cookbook) open while you work. The [canonical vocabulary](/authoring/vocabulary/canonical) is the full reference.

## Rules that keep authoring honest

- **Register before you reference.** A reusable declaration must be registered on a group before another declaration can use it. Registration returns a lightweight typed _ref_.
- **Meaning, not representation.** Say "this field is a UUID and is generated by the system", not "this column is `uuid` with a default". Packs decide the representation.
- **Names are semantic.** Group, app and registration names never contain `.`; the compiler qualifies identities (`users` + `User` becomes `users.User`).
- **One input, one output.** An operation takes a single input (a schema or named fields) and returns a single output.
- **No hidden conventions.** If generated code needs a fact, there is a place in the model to state it.

## Agents

Authoring is deliberately explicit, so agents do well with it. Run `dryv docs authoring` for the built-in tips and `dryv docs agents` for the working rules.
