ShtukbaseStandard
collection/base/contours.md

Contours

The states of records of all layers: each contour has its own phases, moves and conditions.

Page fields (6)
icon🔁
itemTypeContour
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.

# /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
# /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

NormWhat it meansEnforcer (check)
CNT-R01The state of a record is a phase of its contourstates
CNT-R02A contour is connected as a whole: the collection exists, the phases exist, the entry and exits are phases of this contourcontour
CNT-R03A record changes its state only by an allowed movemoves
The package Contours puts this page at /base/contours.md.Source text