# convention

The convention that describes conventions, and its own instance. A convention is its dimensions; each holds members, each named once within it, in one or more hierarchies. A file that says `convention: convention` and lists `dimensions` is one, in hashn's registry or in any workspace.

- **A record convention:** files that follow it (`convention: convention` in the header) are records, not listings; they are indexed and queryable like any file, and aren't in the store.
- **Registered by:** hashn, version 1

## Dimensions

- **name:** What it is called. A registered convention is named by this; a convention file in a workspace is named by its address, workspace_id/path.
- **description:** What kind of thing its instances are, in a sentence or two.
- **dimensions:** A mapping of each dimension's name to what it says. A dimension has a `description`; it may have `members`, each written inside its parent (a name written under a second parent is the same member); it may take its members from another convention (`type: <convention>`); and it may carry rules on its value (`required`, `values`, `multi`, a classical `type` such as number or date).
- **aliases:** Optional: other names it answers to.
- **unique:** Optional, a rule: the dimensions no two instances may share the values of.
- **checks:** Optional, rules: conditions on its instances' values.

## How to use it

Write a file with `convention: convention` in its YAML header and the fields above (`write_file`, in a public workspace for a page or a private one for the room). It is a record, not a listing: `post_listing` is for Needs and Cans.

All conventions: https://api.hashn.com/conventions