package page→ /base/contours.md
pages/base/contours.md
62 lines, 2.9 KB. As a page.
- ---
- type: Collection
- title: Contours
- icon: "🔁"
- description: "The states of records of all layers: each contour has its own phases, moves and conditions."
- itemType: Contour
- items: {mode: type}
- writeTo: /base/contours
- properties:
- collection: {kind: text, label: "Which collection it drives"}
- views:
- - id: contours--table
- name: All contours
- layout: table
- fields: {}
- sorting:
- - {propertyId: title, direction: ascending}
- properties:
- - {name: title, visible: true, width: 360}
- - {name: collection, visible: true}
- ---
- A contour is the life cycle of one type of record: states, the moves between them and the conditions of the moves. Each layer keeps its contours with itself, in the folder `<layer>/contours/`; this collection gathers them all by the type `Contour`, so here they are in one place. A contour drives a collection through a field of the "phase" type in the collection file itself.
- A state that is computed from data (overdue, done, a verdict) is never a contour. A program computes such values itself; they are not set by hand.
- ## How a contour is written
- A contour is a page `<layer>/contours/<name>.md`; its phases are pages in the folder of the same name `<layer>/contours/<name>/<phase>.md`. The phase name is the file name without `.md`; this name is what stands in the state field of a record.
- ```yaml
- # /research/contours/hypotheses.md
- type: Contour
- title: Hypotheses
- collection: /research/hypotheses # which collection it drives
- stageField: status # the state field in the records
- entry: /research/contours/hypotheses/proposed
- phases:
- - /research/contours/hypotheses/proposed
- - /research/contours/hypotheses/checking
- - /research/contours/hypotheses/paused
- ```
- ```yaml
- # /research/contours/hypotheses/paused.md
- type: Phase
- title: Paused
- category: dropped # arriving · working · done · dropped
- doneWhen: "decided whether to return to the hypothesis or not"
- next:
- - {to: /research/contours/hypotheses/proposed, gate: person}
- ```
- In the collection the state field is of the "phase" kind and names the contour: `status: {kind: phase, contour: /research/contours/hypotheses}`. The exits of a phase (`next`) are the allowed moves; the last phase has `next: []`. A phase with `fromAnywhere: true` accepts a record from any phase. The conditions of the moves and who makes them are written in the text of the contour as a "From, To, Condition" table.
- ## Enforcers of the norms
- | Norm | What it means | Enforcer (check) |
- |---|---|---|
- | [CNT-R01](/norms/rules/contours/CNT-R01.md) | The state of a record is a phase of its contour | `states` |
- | [CNT-R02](/norms/rules/contours/CNT-R02.md) | A contour is connected as a whole: the collection exists, the phases exist, the entry and exits are phases of this contour | `contour` |
- | [CNT-R03](/norms/rules/contours/CNT-R03.md) | A record changes its state only by an allowed move | `moves` |